Question 1100
At Kingshade Health Research, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an HCP Terraform VCS workspace points at the repository root although its production Terraform root lives under infrastructure/prod. 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
Test working-directory settings when reorganizing repositories. This control addresses hcp workspace working directory selection because an incorrect working directory can cause runs to evaluate the wrong or empty Terraform root. The original implementation remedy remains: Configure the workspace's correct VCS working directory.
Incorrect Answers
This safeguard is for the dependency described by: HCP Terraform provides remote run stages for planning reviewing and applying infrastructure changes. The continuing risk here is determined by: An incorrect working directory can cause runs to evaluate the wrong or empty Terraform root. The targeted safeguard is “Test working-directory settings when reorganizing repositories”.
“Maintain explicit repository-to-workspace mappings” addresses a different recurring failure: Separate workspaces can target different root modules in the same repository. For the condition in this question, maintain “Test working-directory settings when reorganizing repositories” because an incorrect working directory can cause runs to evaluate the wrong or empty Terraform root.
That review protects the control associated with: Unbounded versions permit major releases that may change provider schemas and behavior. It does not directly prevent the stated recurrence, which concerns: An incorrect working directory can cause runs to evaluate the wrong or empty Terraform root. The appropriate guardrail is “Test working-directory settings when reorganizing repositories”.