Terraform: “Error acquiring the state lock” after a cancelled job
With Terraform (or OpenTofu, its fork), a CI job cancelled in the middle of the tofu apply command leaves the state lock in S3. The DynamoDB LockID item, the .tflock file of Terraform 1.10 and OpenTofu 1.10, when the force-unlock command is safe, when it creates two writers, and how to make the CI wait.