Terraform 1.6.x does not find *.tfstate file in s3 which was created using older versions of terraform #34279
Labels
backend/s3
bug
new
new issue not yet triaged
v1.6
Issues (primarily bugs) reported against v1.6 releases
Terraform Version
Terraform Configuration Files
Here is backend.tf file:
Debug Output
Here is log from terraform 1.5.x (credentials removed) (result - 200 OK):
Here is the log from terraform 1.6.x (404 error):
Expected Behavior
Expect plan successfully executed
Actual Behavior
terraform plan returns error:
│ Error: error loading state: state data in S3 does not have the expected content.
│
│ The checksum calculated for the state stored in S3 does not match the checksum
│ stored in DynamoDB.
│
│ Bucket: ocb-ocb-terraform-state
│ Key: ./terraform.tfstate
│ Calculated checksum:
│ Stored checksum: bb17f4c60b305db0f0fd8210c8da8332
│
│ This may be caused by unusually long delays in S3 processing a previous state
│ update. Please wait for a minute or two and try again.
│
│ If this problem persists, and neither S3 nor DynamoDB are experiencing an
│ outage, you may need to manually verify the remote state and remove the Digest
│ value stored in the DynamoDB table
│
│
│
Steps to Reproduce
Using terraform 1.5.x apply plan:
Upgrade to 1.6.x and then apply:
1.6 version returns error:
Additional Context
No response
References
Also created issue in terragrunt, because backend.tf is actually created by terragrunt:
gruntwork-io/terragrunt#2792
The text was updated successfully, but these errors were encountered: