Question 160
A Terraform associate evaluates: A change committee wants evidence of planned resource replacements before allowing apply. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A change committee wants evidence of planned resource replacements before allowing apply. The directly relevant Terraform response is: Write configuration, initialize the directory, validate and review a plan, then apply the reviewed infrastructure changes. This addresses the related failure mode: Skipping plan review can execute an unintended destructive or replacement operation. Validate the result by checking: The approved apply corresponds to a reviewed plan that describes the intended actions and dependencies. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A change committee wants evidence of planned resource replacements before allowing apply. The acceptance evidence is: The approved apply corresponds to a reviewed plan that describes the intended actions and dependencies. It verifies the corrective approach (Write configuration, initialize the directory, validate and review a plan, then apply the reviewed infrastructure changes.) and controls the risk: Skipping plan review can execute an unintended destructive or replacement operation. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
A consistently formatted file can still contain invalid references or unsupported provider attributes. This belongs to Formatting Terraform HCL (official objective 3g). Its separate risk is that a consistently formatted file can still contain invalid references or unsupported provider attributes. The question instead tests Core plan-first workflow; that other safeguard alone does not verify it.
Initialization completes and the subsequent validate and plan commands find required dependencies. That addresses Initialize module and provider dependencies (official objective 3b), specifically the hazard that planning before initialization can fail due to unavailable plugins, modules or backend configuration. Here the necessary action or evidence is the paired action Write configuration, initialize the directory, validate and review a plan, then apply the reviewed infrastructure changes and separate validation The approved apply corresponds to a reviewed plan that describes the intended actions and dependencies, not that separate control.
Apply an approved saved plan with terraform apply planfile rather than attempting to pass fresh input variables to the saved plan. This does not provide the required Core plan-first workflow action-and-evidence pair.