Terraform CLI Cheat Sheet/Apply with lock timeout

Wait for an existing state lock before failing.

Section: Locking and Recovery

Apply with lock timeout

bash
bash
terraform apply -lock-timeout=120s
Explanation

Wait for an existing state lock before failing.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Locking and Recovery
Force unlock state
Release a stuck state lock by lock ID.
OpenIn sheetbashsame section
Refresh-only apply legacy
Preferred modern replacement for older refresh-only workflows.
OpenIn sheetbashsame section
Apply changes
Create or update infrastructure after approval.
OpenIn sheetbash2 tag match
Apply without prompt
Skip interactive approval prompt.
OpenIn sheetbash2 tag match
Apply saved plan
Apply exactly the actions saved in a plan file.
OpenIn sheetbash2 tag match
Show Terraform version
Print the installed Terraform CLI version and provider versions in use.
OpenIn sheetbash1 tag match