Question 400
At Mapleridge Manufacturing IT, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a Terraform plan inadvertently proposes replacing a protected production database and the owner wants a hard stop. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. Which operational control addresses the risk long term?
Explanation
Correct Answer
Protect essential resources and audit changes to safety lifecycle rules. This control addresses prevent destroy for critical resources because prevent_destroy rejects plans that would destroy a configured protected resource. The original implementation remedy remains: Configure a suitable lifecycle prevent_destroy policy and review the replacement trigger.
Incorrect Answers
“Tag ephemeral environments and require teardown approval” addresses a different recurring failure: Destroy is intended to remove resources tracked by the target root configuration and state. For the condition in this question, maintain “Protect essential resources and audit changes to safety lifecycle rules” because prevent_destroy rejects plans that would destroy a configured protected resource.
That review protects the control associated with: An unsaved new apply can recompute different changes from those reviewers approved. It does not directly prevent the stated recurrence, which concerns: prevent_destroy rejects plans that would destroy a configured protected resource. The appropriate guardrail is “Protect essential resources and audit changes to safety lifecycle rules”.
“Audit module output necessity and security classification” addresses a different recurring failure: Module interfaces can expose selected data without publishing every internal attribute. For the condition in this question, maintain “Protect essential resources and audit changes to safety lifecycle rules” because prevent_destroy rejects plans that would destroy a configured protected resource.