state locking

Preventing two Terraform runs from writing the same state at once, by taking a lock before any operation that could change it.

In more detail

Without a lock, two applies can overwrite each other's state and lose track of real resources. Locking is separate from storage: a backend may store state safely yet not lock it unless configured. terraform force-unlock releases a lock left behind by a crashed run, and should be used only when you are sure nobody else is running.

Related terms

Related guides

Taught in

References

Certification courses