-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
terraform remote state has to be run twice #9330
Comments
This is also happening to me. Remote state would pull down fine but on apply it kept giving 403 errors. My steps were (using a python wrapper): terraform.py remote Once I added another remote step in between plan and apply it worked perfect? On version 0.7.7 Nevermind, all looks ok now. Think it was a glitch when copying my state file to a server side encryption required S3 bucket. Ever since adding that second remote step and performing a proper apply, I have been able to remove the second remote step and everything runs fine. |
Hi @myoung34 and @lhickin! Sorry for the issues here and sorry we let this issue languish. The remote system was completely redesigned for 0.9, so the workflow this issue is discussing is no longer present. Given how much the relevant parts of Terraform have changed since 0.7.5 I'm going to close this. If anyone is seeing similar issues in 0.9 or above I suggest opening a fresh issue so that we can triage and address it separately. Thanks for opening this issue! |
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. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
0.7.5
Affected Resource(s)
Technically affects all resources
Terraform Configuration Files
Debug Output
https://gist.github.com/myoung34/c2343ed930e25899718c5c14cea7290b
Expected Behavior
Should have succeeded in initializing remote states
Actual Behavior
Failed and bombed out on first initialize. Fixed by running
bash init.sh || bash init.sh
Succeeds on second run every time
Steps to Reproduce
terraform remote config -backend=s3
near immediate start of instanceImportant Factoids
Running from Jenkins EC2 slave instance using IAM role. Will fail the first time ever run. All subsequent uses of
terraform remote config
will succeed.References
#5839 - see @sjpalf 's comment
The text was updated successfully, but these errors were encountered: