Question 780
A Terraform rollout has separate acceptance criteria: avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles. Which combined approach directly satisfies the two criteria?
Explanation
Correct Answer
For the first criterion, a deployment environment should have its own variables, state, and run controls; shared module code can still be reused between environments; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles; this directly addresses the need to avoid staging changes being applied to production state. For the separate second criterion, each workspace stores its own run and state version records; a project groups those records conceptually rather than producing one combined history; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles; this fulfills the need to retain independent records for separate infrastructure lifecycles. Together they cover the independent tasks of avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles without exchanging the responsibilities of these features.
Incorrect Answers
The second measure does meet the retain independent records for separate infrastructure lifecycles requirement, but the first is designed for another concern: Workspace state boundaries keep one apply from automatically modifying another workspace's objects; project membership does not merge states; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles. That first component is designed to isolate resource bindings between independently managed deployments, which does not accomplish the requested task to avoid staging changes being applied to production state, even though the other measure satisfies retain independent records for separate infrastructure lifecycles.
The first measure meets the requirement to avoid staging changes being applied to production state, but its partner serves a different role: HCP workspaces carry roles, configuration links, variable settings, and history; cLI workspaces mainly distinguish multiple state instances in a backend; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles. That second component is designed to avoid equating hosted run projects with local named state variants, so the still-missing criterion is to retain independent records for separate infrastructure lifecycles, while the first criterion remains avoid staging changes being applied to production state.
The first measure is intended to share truly global settings without surprising unrelated workspaces: Organization-scoped values affect a broad audience and may have precedence interactions; more limited scope is preferable for environment-specific secrets; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles. The second measure is intended to apply consistent permissions to related workspaces: Project-level organization can reduce repeated access assignments; fine-grained workspace controls still determine who can operate a specific workspace; this behavior should be assessed against the concrete need to avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles. Neither is the directly designated method for the separate goals of avoid staging changes being applied to production state and retain independent records for separate infrastructure lifecycles in this review.