The Google Cloud Terraform provider includes, on Cloud SQL instances, an argument "deletion_protection" that defaults to true. It will make the provider fail to apply any change that would destroy that instance without first applying a change to set that argument to false.
That's what I expected lifecycle.prevent_destroy to do when I first saw it, but indeed it does not.
That's what I expected lifecycle.prevent_destroy to do when I first saw it, but indeed it does not.