-
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 Initialisation Error #12971
Comments
Same problem for me with v0.9.1. I dynamically construct the S3 key and since interpolation is not available for backend config, I am passing the key in However, as mentioned, this option forces a backend change and interactive prompts break our automation. |
Hi, Thanks for reporting the issue. A problem merging "terraform" configuration blocks was recently fixed by #12942 , and will be included in the next release. I verified the above reproduction case works in master. |
Looks like the issue still exists in v0.9.2 for me. When I run
I get:
|
Deleting |
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. |
Admittedly this is probably very low priority issue, as it only happens if you rerun initialisation in a folder where the backend was already initialised. Not a blocker by any means, but it was definitely unexpected.
NOTE: Obviously the bucket name is not the one I use, and I changed a few paths and so on, but this should be reproducible.
Terraform Version
0.9.1
Affected Resource(s)
S3 backend locking during initialisation.
Terraform Configuration Files
config.tfvars:
main.tf
:Debug Output
Gist
Expected Behavior
It should not have noted any changes to the backend, if I run the command twice in a row with the same configuration. Furthermore, when trying to copy over states with the same names, it should not run into locking issues.
Actual Behavior
On every init run, changes in the backend are detected, even there are no actual configuration changes. Furthermore, when trying to copy over pre-existing state that has the same exact key, it fails to acquire the lock. When replying "no" to copying over pre-existing state, it works just fine.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init -backend-config='key=global.tfstate' -backend-config=config.tfvars
The text was updated successfully, but these errors were encountered: