Skip to content

    ← All posts

    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.

    Spotted an error, something to add?

    Tell me: I read every message and correct the article when needed.

    Your name only appears below the article with this consent, and only if the remark is used. Your address is never published.