Rationale for Correct Answer: terraform force-unlock should be used only when Terraform’s normal automatic unlocking has failed and you are sure no other Terraform process is actively using the state. It manually removes a stale lock.
Analysis of Incorrect Options (Distractors):
A. When terraform apply has failed due to a state lock. Incorrect. A lock error alone does not justify force unlocking. Another valid Terraform operation may still be running.
B. When you have a high-priority change. Incorrect. Urgency is not a valid reason to bypass state locking safeguards.
D. When you see a status message stating that Terraform cannot acquire the lock. Incorrect. This may simply mean another run is active. You should investigate before using force-unlock.
Key Concept: Force unlocking is a recovery action for stale locks, not a normal operational shortcut.
[Reference: Terraform Objective Domain: Navigate Terraform State and Backends , ====================, ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit