-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 backend prompts for copy from s3 to s3 #16418
Comments
Had the same issue with 0.10.6. I replied yes to the s3 to s3 copy and it somehow copied a completely different state file from elsewhere even though the only reference in the backend was to the bucket where the correct state file was located. |
@cwire4 yes . I have been bitten by that .. had to intervene manually |
Just curious, how did you intervene? I only found out after the fact when trying a plan after setting up the backend. We had versioning on so swapping versions of the tfstate file, editing the digest for the lock table in DynamoDB, and reinitializing fixed it for me. |
@cwire4 Yes.. thats it. Had to revert to older version on state file in s3 and update the digest for the now 'latest' state file into dynamo. |
@suneeta-mall check your local TF_DATA_DIR. Looks like when terraform copies state from S3 to local if other (different state file) state exists that error comes up. This error is due to mismatch of state in s3 vs local copy (if local copy exists). |
I am going to close this issue due to inactivity. If there is still a question, I recommend the the community forum, where there are far more people available to help. If there is a bug or you would like to make a feature request, please open a new issue and fill out the template. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I am using s3 backend with versioning enabled. Init scripts correctly prompts me if I want to copy from s3 to local. After this, I am not sure why I am prompted with copy from s3 to s3. If I am using versioning, I would have thought it will pick the latest version but I am not sure what this copy from s3 to s3 is all about.
Please see details.
Terraform Version
Terraform v0.10.6
Terraform Configuration Files
Expected Behavior
What should have happened?
TF should have configured backend from s3 using latest version
Actual Behavior
What actually happened?
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform apply
The text was updated successfully, but these errors were encountered: