When should you use the terraform force-unlock command?
A.
When terraform apply has failed due to a state lock.
B.
When you have a high-priority change.
C.
When automatic unlocking has failed.
D.
When you see a status message stating that Terraform cannot acquire the lock.
The Answer Is:
C
This question includes an explanation.
Explanation:
Detailed Explanation:
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, ====================, ]
Terraform-Associate-004 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"