terraform initialization failure
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Terraform is being cautious here. The state lock error means Terraform believes another process is using the state file, even if that process no longer exists.
This usually happens after an interrupted run—someone closes their laptop, a CI job gets canceled, or a network connection drops during
apply. Terraform leaves the lock behind to protect the state, but it has no way to know the process died.If you’re sure no one else is running Terraform, manually unlocking the state is safe. The key thing is to avoid force-unlocking while another deployment is genuinely in progress, because that’s when state corruption happens.
Takeaway: State locks are normal, and stale locks are a routine operational issue, not a Terraform bug.