-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 bucket rewind error when running apply #34528
Comments
FWIW, I'm seeing this same issue in v1.6.6 both from laptop and in pipelines - after all the resource changes have happened, terraform fails with
seems to be completely random, always in a tree with multiple workspaces. Nothing fancy in our perms, standard AWS SSO users on laptop and EC2 instance IAM roles in CI. Having it fail in pipelines is particularly problematic, as our pipelines don't currently save errored.tfstate if it exists - so cleaning up is nasty manual state manipulation. |
We see the same issue in v1.6.6. Please see the trace for more insights:
NOTE, s3 bucket and tf backend values were further redacted with |
Hi, |
Given the timeline, this seems a direct result of #34313. The changes look very innocent so possible an upstream issue. |
We are seeing these errors sporadically with version 1.6.6 as well |
We're also seeing this with Terraform |
For us this started happening from time to time, and even happens when there are no changes to apply:
Not sure why any state is being saved if no changes are being applied. But for me a rerun of the failed job usually solves the issue. |
just updated to terraform 1.6.6 and also seeing the issue. |
As a workaround, we set |
The
|
I'm seeing this issue in 1.7.3. |
saw this randomy on 1.7.1 |
Have the same issue on 1.7.2. Which is the latest version that this issue does not occur? |
1.6.4 is where we settled |
Seeing the same issue using the github action: |
Seeing this with |
I saw this ticket was closed and just upgraded to the latest available version, 1.7.4, to pick up the fix. ... then I got the error again while deploying the upgrade. |
@chrisdenton-ct 1.7.4 would not have this fix. The fix was only merged 4 days ago. 2024-03-09. 1.7.4 was released prior to that on 2024-02-21. |
1.7.5 (March 13, 2024) backend/s3: When using s3 backend and encountering a network issue, the retry code would fail with "failed to rewind transport stream for retry". Now the retry should be successful. (#34796) |
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. |
Terraform Version
Terraform Configuration Files
Debug Output
I can't reproduce the issue again so can't get a debug output, but here is the default output logs we saw:
Expected Behavior
Terraform apply should run succesfully. If an error occurs during state sync I would also expect the run to end immediately to prevent any divergence in state.
Actual Behavior
Terraform apply continued running but appeared to have some bad state causing it to create/delete resources incorrectly.
Steps to Reproduce
terraform init -no-color
terraform apply -no-color -auto-approve -input=false
As I mentioned earlier, we can't reliably re-produce though.
Additional Context
This was running inside a GHA using
hashicorp/setup-terraform@v3
We were also using AWS OIDC to assume a role automatically in the runner: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
References
No response
The text was updated successfully, but these errors were encountered: