Question 910
At Duneland Manufacturing IT, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an apply crashed and left a verified stale lock belonging to the same team's operation. 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
Force-unlock bypasses normal lock safeguards and should only release a known stale lock. That mechanism distinguishes force unlock stale own lock in the Duneland Manufacturing IT case. The corresponding appropriate correction is: Use terraform force-unlock with the exact lock ID only after confirming no active writer. The measurable acceptance test is: The original lock ID is cleared without interrupting another active operation.
Incorrect Answers
This alternative is valid when different backend implementations offer different locking mechanisms or none. The facts here establish a different controlling reason: Force-unlock bypasses normal lock safeguards and should only release a known stale lock.
“State tracks configuration addresses and a rename needs a migration mapping to preserve ownership” reflects the mechanism: State tracks configuration addresses and a rename needs a migration mapping to preserve ownership. The actual reported symptoms are better explained by: Force-unlock bypasses normal lock safeguards and should only release a known stale lock.
This alternative is valid when formatting does not rewrite resource graph semantics or rename resource addresses. The facts here establish a different controlling reason: Force-unlock bypasses normal lock safeguards and should only release a known stale lock.