Google Cloud Professional Cloud Database Engineer — Question 127

Your DevOps team is using Terraform to deploy applications and Cloud SQL databases. After every new application change is rolled out, the environment is torn down and recreated, and the persistent database layer is lost. You need to prevent the database from being dropped. What should you do?

Answer options

Correct answer: A

Explanation

Setting Terraform deletion_protection to true ensures that the Cloud SQL database will not be deleted during the environment teardown and recreation process. The other options do not address the issue of preventing database deletion; rerunning terraform apply only applies the current configuration, creating a read replica does not prevent deletion, and point-in-time-recovery is a recovery method rather than a preventative measure.