Topic 1 Question 130
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?
Set Terraform deletion_protection to true.
Rerun terraform apply.
Create a read replica.
Use point-in-time-recovery (PITR) to recover the database.
γ³γ‘γ³γ(1)
A. It makes sense that a Terraform problem would use a Terra form solution. From Google's documentation, "For stateful resources, such as databases, ensure that deletion protection is enabled. The syntax is: lifecycle { prevent_destroy = true } https://cloud.google.com/docs/terraform/best-practices-for-terraform#stateful-resources
π 2dynamic_dba2023/03/27
γ·γ£γγγ«γ’γΌγ