Error acquiring the state lock Terraform Origin: Platform & cloud Last updated 13 Oct 2026

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.

Exact message you may see Error acquiring the state lockstate blob is already locked
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

  1. Wait for the other run to finish
  2. force-unlock only when sure nothing is running
  3. Serialize pipeline runs per workspace

Detailed fix by platform

Shell

  1. terraform force-unlock 6f2a1c9d-xxxx-xxxx-xxxx-1a2b3c4d5e6f

How to diagnose

  1. Lock — Who/when (Info in the error)
  2. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

1213 — MySQL ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction (MySQL)1213409 — HTTP 409 Conflict (HTTP)409Actions must be plain objects — Error: Actions must be plain objects. Instead, the actual type was: 'function'. (React)Actions must be plain…ConditionalCheckFailedException — ConditionalCheckFailedException: The conditional request failed (AWS)ConditionalCheckFaile…Deadlock — Deadlock found when trying to get lock; try restarting transaction (SQL)DeadlockIllegalStateException — java.lang.IllegalStateException (Java)IllegalStateExceptionInconsistent dependency lock file — Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected (Terraform)Inconsistent dependen…Lock wait timeout — Lock wait timeout exceeded; try restarting transaction (MySQL 1205) (SQL)Lock wait timeoutError acq…

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.