Question 740
At Yellowcrest Cloud Operations, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an engineer changes a module source from local to registry but calls terraform plan without reinitializing. 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
Treat module source changes as dependency update events. This control addresses module source change requires init because terraform installs modules during initialization and may still have the old source cached. The original implementation remedy remains: Rerun terraform init after an authorized module source change.
Incorrect Answers
That review protects the control associated with: Private module source access is a separate authorization from provider installation. It does not directly prevent the stated recurrence, which concerns: Terraform installs modules during initialization and may still have the old source cached. The appropriate guardrail is “Treat module source changes as dependency update events”.
“Preserve stable keys for repeated module deployments” addresses a different recurring failure: Modules can be instantiated repeatedly using meta-arguments rather than duplicated declarations. For the condition in this question, maintain “Treat module source changes as dependency update events” because terraform installs modules during initialization and may still have the old source cached.
That review protects the control associated with: The CLI is an engine but the configuration is the declared desired-state source. It does not directly prevent the stated recurrence, which concerns: Terraform installs modules during initialization and may still have the old source cached. The appropriate guardrail is “Treat module source changes as dependency update events”.