5 ms·
That's why we try to set our databases to deletion_protection=true, and make it hard to delete them. But your point still largely stands!
by sverhagen 5y ago
That's why we try to set our databases to deletion_protection=true, and make it hard to delete them. But your point still largely stands!
- paulgb 5y agoInterestingly, that's the default for GCP but not AWS, even though both providers are developed by Hashicorp. I was pleasantly surprised by how difficult it was to (even intentionally) delete my GCP database when I was starting to use terraform.
- nijave 5y agoTerraform usually use cloud provider defaults if they're applicable. There's also 2 deletion protection mechanisms for RDS (and maybe GCP DBs). AWS has built in deletion protection which is an attribute on the resource and Terraform has lifecycle protection which is a meta attribute you can put on any resource type. The former disables the delete API (returns an error) on the AWS side and the latter prevents Terraform from running the destroy event (which includes replaces)