Terraform apply fails with "Error acquiring the state lock". What do you do?

IntermediateHands-onLive debugging tasks
Answer
terraform plan            # shows the lock ID, who holds it and since when
# confirm no CI job or teammate is actually running an apply
terraform force-unlock <LOCK_ID>

Key trick → Only force-unlock after confirming the holder is dead (for example, a crashed CI runner). Unlocking during a live apply can corrupt state. CI concurrency groups prevent most of these.

All Real-World Interview questions Roadmap: Interview readiness

More on Live debugging tasks