Skip to content
devops

State Locking

Terraform State Locking

Definition

State locking prevents multiple Terraform processes from simultaneously modifying the same state file, which could cause corruption or inconsistent infrastructure. Remote backends like S3 with DynamoDB, GCS, and Terraform Cloud provide locking mechanisms.

When a plan or apply is running, the state is locked and subsequent operations must wait or fail with an error.


Ship secure code faster

Crash Override integrates security into the developer workflow. No context switching, no waiting on reviews.