Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked
Another Terraform run holds the state lock, or a previous run crashed and left the lock behind.
Seen on:
Terraform
Meaning
Remote backends (S3+DynamoDB, Azure blob, GCS, Terraform Cloud) lock state during plan/apply. Concurrent pipelines or killed runs leave stale locks; the error shows the Lock ID and who holds it.
Common causes
- Another plan/apply running (CI + local)
- Previous run killed (Ctrl+C, runner timeout)
- Pipeline concurrency without serialization
⚡ Quick fix
- Wait for the other run to finish
- force-unlock only when sure nothing is running
- Serialize pipeline runs per workspace
Detailed fix by platform
Shell
terraform force-unlock 6f2a1c9d-xxxx-xxxx-xxxx-1a2b3c4d5e6f
How to diagnose
- Lock — Who/when (Info in the error)
- Runs — Anything still running?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Terraform
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026