Skip to main content
RunBook Academy

← All break/fix scenarios in Terraform

intermediateterraform-state~20 min

State Lock Held While Apply Is In Progress

Reported symptoms

  • The apply is in progress
  • Another engineer cannot run apply
  • The state lock is held

Evidence

  • · The lock information shows the operation
  • · The lock information shows the holder
  • · The apply process is running
Diagnosis and resolutionclick to reveal

Root cause

A second engineer attempted to acquire the lock while the first apply is in progress. The lock prevents concurrent state mutation.

Remediation

1. Wait for the first apply to complete. 2. If the first apply is hung, force-unlock. 3. Verify the state is consistent. 4. Document the incident.

Verification

The state lock is cleared, the state is consistent, and the incident is documented.

Prevention

1. Document the lock procedure. 2. Train engineers to wait. 3. Use the lock information to identify the holder.

State Lock Held While Apply Is In Progress

A second engineer attempted to acquire the lock while the first apply is in progress. The lock prevents concurrent state mutation.