Every OpenTofu user hits the same wall of errors eventually, usually at the worst possible moment — mid-deploy, in CI, with a teammate waiting. After enough tofu apply runs on real infra I've learned that most of these have a fast, deterministic fix once you recognize the message. This is the field guide I wish I'd had: the errors you'll actually see and the shortest path out of each.

The CLI is tofu (OpenTofu is the Linux Foundation fork of Terraform), but almost all of these apply identically to terraform if you're still on it.

1. State lock: "Error acquiring the state lock"

You'll see a ConditionalCheckFailedException or a lock ID dump. It means a previous run died without releasing the lock, or someone is genuinely running apply right now.

First, make sure nobody is actually applying. Then force-unlock with the ID from the error: