Question 1160
At Meadowcrest Financial Systems, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: one monorepo contains separate application roots and two HCP workspaces accidentally point to the same 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
Maintain explicit repository-to-workspace mappings. This control addresses workspace vcs root mapping in monorepo because separate workspaces can target different root modules in the same repository. The original implementation remedy remains: Set distinct working directories and workspace-specific triggers for each root.
Incorrect Answers
This safeguard is for the dependency described by: Run triggers coordinate downstream workspace evaluations after upstream changes. The continuing risk here is determined by: Separate workspaces can target different root modules in the same repository. The targeted safeguard is “Maintain explicit repository-to-workspace mappings”.
“Test federation claims and minimum required roles when onboarding workspaces” addresses a different recurring failure: Short-lived dynamic credentials require matching external trust and authorization rules. For the condition in this question, maintain “Maintain explicit repository-to-workspace mappings” because separate workspaces can target different root modules in the same repository.
That review protects the control associated with: Disabling locks during concurrent operations risks state corruption and conflicting infrastructure changes. It does not directly prevent the stated recurrence, which concerns: Separate workspaces can target different root modules in the same repository. The appropriate guardrail is “Maintain explicit repository-to-workspace mappings”.