Question 370
At Larkhill Education Services, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a saved plan is approved but another authorized run modifies the same state before it is applied. 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
Terraform can reject saved plans when state serial or configuration context no longer matches. That mechanism distinguishes plan invalidation after state change in the Larkhill Education Services case. The corresponding appropriate correction is: Regenerate and reapprove a plan against current state rather than force an obsolete plan. The measurable acceptance test is: The newly generated plan reflects changes from both operators.
Incorrect Answers
This alternative is valid when an apply can partially succeed and state may already track successfully created objects. The facts here establish a different controlling reason: Terraform can reject saved plans when state serial or configuration context no longer matches.
“Module variable type constraints define the shape accepted by module calls” reflects the mechanism: Module variable type constraints define the shape accepted by module calls. The actual reported symptoms are better explained by: Terraform can reject saved plans when state serial or configuration context no longer matches.
This alternative is valid when postconditions assert properties of a resolved object and can block downstream consumers. The facts here establish a different controlling reason: Terraform can reject saved plans when state serial or configuration context no longer matches.