Question 1150
At Longpine Logistics Networks, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: multiple workspaces in one compliance project must share an approved region setting without affecting other projects. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. What mechanism explains why the original approach fails?
Explanation
Correct Answer
Shared variable sets can be scoped to appropriate workspace collections. That mechanism distinguishes project variable-set assignment in the Longpine Logistics Networks case. The corresponding appropriate correction is: Assign a scoped variable set to the intended project or its workspaces. The measurable acceptance test is: Only eligible project workspaces receive the setting in their plans.
Incorrect Answers
This alternative is valid when hCP Terraform projects organize workspaces but do not replace each workspace's state. The facts here establish a different controlling reason: Shared variable sets can be scoped to appropriate workspace collections.
“An incorrect working directory can cause runs to evaluate the wrong or empty Terraform root” reflects the mechanism: An incorrect working directory can cause runs to evaluate the wrong or empty Terraform root. The actual reported symptoms are better explained by: Shared variable sets can be scoped to appropriate workspace collections.
This alternative is valid when auto-approve bypasses interactive confirmation and can execute unsafe unreviewed changes. The facts here establish a different controlling reason: Shared variable sets can be scoped to appropriate workspace collections.