Question 380
At Larkhill Retail Infrastructure, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a newly added provider module is checked into CI and the job jumps directly to terraform apply in a fresh directory. 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
Define explicit init and validation stages in CI. This control addresses apply does not install missing provider automatically because apply relies on initialized provider and module dependencies. The original implementation remedy remains: Run terraform init then validate and plan before apply.
Incorrect Answers
That review protects the control associated with: Terraform normally asks for confirmation before applying an interactively generated plan. It does not directly prevent the stated recurrence, which concerns: Apply relies on initialized provider and module dependencies. The appropriate guardrail is “Define explicit init and validation stages in CI”.
“Protect essential resources and audit changes to safety lifecycle rules” addresses a different recurring failure: prevent_destroy rejects plans that would destroy a configured protected resource. For the condition in this question, maintain “Define explicit init and validation stages in CI” because apply relies on initialized provider and module dependencies.
That review protects the control associated with: Imperative scripts encode actions rather than a convergent description of managed objects. It does not directly prevent the stated recurrence, which concerns: Apply relies on initialized provider and module dependencies. The appropriate guardrail is “Define explicit init and validation stages in CI”.