Interview practice question
Terraform says the state is locked
Cloud & DevOps · Terraform and IaC · Beginner
terraform plan fails with "Error acquiring the state lock." What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Someone else may be running apply.
- Check who holds lock (lock info).
- Wait or coordinate.
- If stale (crashed run): force-unlock with lock ID.
- Use pipelines to avoid local runs.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.