Search code examples
terraformterraform-provider-aws

Terraform: Failed to unlock state: failed to retrieve lock info: unexpected end of JSON input


  • Terraform v0.13.5
  • provider aws v3.7.0
  • Backend: AWS S3+DynamoDB

terraform plan was aborted, and now it cannot acquire the state lock. I'm trying to release it manually but get error:

terraform force-unlock -force xxx-xxx-xx-dddd

Failed to unlock state: failed to retrieve lock info:
unexpected end of JSON input

The state file looks complete and passes json syntax validation successfully.

How to fix that?


Solution

  • Solution: double-check you're in correct terraform workspace.