-
Notifications
You must be signed in to change notification settings - Fork 233
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
Error when fixing template with 2 IAM policies with the same name #104
Comments
Any updates on this issue? |
Hi @nickwilmes! Sorry for the slow response here. Unfortunately without a little more information it's impossible to infer what happened here. If you wouldn't mind giving us a little more to work with, I'd appreciate it if you could copy the issue template and complete the information requested, and then that'll give us a starting point towards explaining why you saw this error. Thanks! |
Terraform Version
Terraform Configuration FilesDebug OutputCrash OutputExpected Behaviorsuccessfully applying changes Actual Behavior
Steps to Reproduce
Note: I haven't been able to identify a specific change that guarentees this issue, but once it appears I couldn't get rid of it without distroying everything and reapplying. Additional ContextReferences |
Hi @nickwilmes! Thanks for the follow-up. Unfortunately without the rest of the information requested in the template there's not really any way for us to reproduce this and understand what the problem is. In particular, we'd need to see a configuration that exhibits the problem and the debug output produced by following the instructions in the template. Thanks! |
This was from back in April and is a production facing environment, so I had to destroy the state file and manage it by hand. As for configuration files, I have none set up on my machine so the defaults should apply. I have seen it appear other times as well with cloud front. It doesn't appear to be based on any obvious settings I apply, but rather the terraform state of the cloudfront resource becoming corrupted somehow. Just creating any cloudfront resource (the existence of an edge lambda setting is the only common thing among them) and make a series of random updates to it until the error appears seems to be the best way to reproduce. |
Hi, has any progress been made on this? We have run into it again and it is making terraform unusable with cloudfront. I was able to get a trace output this time, but don't want to publicly post it. I noticed that your bug file description says that you have an encryption key I can use to post it encrypted, but it provides no information on how to do so. If you have instructions for that I can provide the trace I have collected. |
Hi @nickwilmes When you run into a problem involving state I'd always suggest reporting the bug straight away with the necessary details as outlined above (esp. with configuration) and always avoid manipulating the state outside of Terraform. That can help us better understand what may have happened, help us reproduce it and (most importantly) fix it. Terraform offers a handful of commands that can help you perform some basic state modifications safely:
The encryption key we provide is of standard PGP format and it is conveniently also hosted on Keybase. Keybase allows you to encrypt any content with our key straight on the website without having to install any tooling locally. You mentioned that you attempted to modify 2 resources with the same name. This is unfortunately something Terraform can't prevent yet and this attempt may result in 1 real resource being managed in two places, which may get confusing. This may be preventable in the future though - #224 describes that problem in more detail so I'd recommend subscribing to that issue if it interests you. |
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 ran into an issue where I accidentally had the same name for 2 different policies (which works in terraform and it just overwrites eachother) and when I tried to apply a fix to give both a different name, I got the following error.
The text was updated successfully, but these errors were encountered: