QuestionQ14

VerifiedDeploy scalable and highly available databases in Google Cloud

Your DevOps team uses Terraform to deploy applications and Cloud SQL databases. After each new application change is deployed, the environment is destroyed and recreated, causing the persistent database layer to be lost. You need to stop the database from being dropped. What should you do?

Explanation

For a Cloud SQL instance managed by Terraform, deletion_protection = true is a Terraform-level safeguard that prevents Terraform from deleting the instance. If a plan requires a destroy-and-recreate operation, Terraform blocks it until deletion protection is explicitly disabled.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!