SpinTheMic
Pro

Interview practice question

Terraform state lock errors and conflicts

Data Engineering · DataOps CI/CD · Intermediate

Two engineers ran Terraform at the same time, and now there are lock errors and inconsistent state. How do you fix and prevent this?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Use remote state with locking.
  • Investigate stuck lock; force-unlock only after confirming no apply is running.
  • Run plan to check state matches reality.
  • Move applies to CI only.
  • Split state to reduce contention.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics