Question 220
A Terraform associate evaluates: A controlled deployment should reject a stale saved plan after state changes. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A controlled deployment should reject a stale saved plan after state changes. The directly relevant Terraform response is: Create a saved execution plan with terraform plan -out and apply that exact saved plan after approval, recognizing it can contain sensitive data. This addresses the related failure mode: Running a fresh implicit plan at apply time may differ from the earlier reviewed configuration or state. Validate the result by checking: The applied saved plan is the approved artifact and its access and retention are controlled. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A controlled deployment should reject a stale saved plan after state changes. The acceptance evidence is: The applied saved plan is the approved artifact and its access and retention are controlled. It verifies the corrective approach (Create a saved execution plan with terraform plan -out and apply that exact saved plan after approval, recognizing it can contain sensitive data.) and controls the risk: Running a fresh implicit plan at apply time may differ from the earlier reviewed configuration or state. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Automatically rewriting formatting during a read-only CI check can produce untracked repository changes. This belongs to Formatting check in CI (official objective 3g). Its separate risk is that automatically rewriting formatting during a read-only CI check can produce untracked repository changes. The question instead tests Saved plan file for reviewed execution; that other safeguard alone does not verify it.
Validate reports consistent HCL and a separate plan exposes provider or infrastructure issues. This is relevant to terraform validate versus provider-aware plan (official objective 3c). Its distinct failure risk is that passing validate does not prove credentials, permissions or remote object behavior will succeed at apply. The present question tests Saved plan file for reviewed execution, which this measure alone does not establish.
Use terraform plan to inspect creates, updates, replacements and destroys and resolve unexpected operations before apply. That addresses Review Terraform plan changes (official objective 3d), specifically the hazard that applying without examining replace or destroy indicators can remove critical production resources. Here the necessary action or evidence is the paired action Create a saved execution plan with terraform plan -out and apply that exact saved plan after approval, recognizing it can contain sensitive data and separate validation The applied saved plan is the approved artifact and its access and retention are controlled, not that separate control.