-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_kms_key is being modified on every run #402
Comments
Any progress on this? I'm hitting this issue now with Terraform v0.11.2 |
we are hitting this as well on 0.11.2 |
Can someone please provide example configurations (with sensitive information redacted)? We'll need to see the policy structures to determine why the resource wants to change them. Thanks! |
It doesn't happen for me any more, but that's because I specifically changed the "order of things" in the policy. Looking at what TF wanted to do and what my policy looked like, I rearranged all the values and lines so that mine looked like what TF wanted to do and that stoped this from happening again. Now I just copy-and-paste stuff, so I haven't had this in a very long time. But I'm seeing the same problem in many different policy documents. TF is very picky of the order and if you don't get that right, TF wants to modify the record. |
We have implemented in some resources within the provider, but not all, ways to prevent most policy equivalency issues. I'd suggest providing specific examples for specific resources (new issues if they aren't this
This sounds like an attribute is missing |
FWIW, I've just run into this problem with aws_kms_key and the culprit turned out to be an omitted Version key. Without it, the policy was recreated every run. Explicitly adding Version fixed the issue. |
We are getting the same problem, even when using When comparing the documents verbatim there are plenty of differences to the order of all the keys in each Statement object, but that should generally be handled by the If it is true that the diff supression function should apply in general, and I am still seeing this issue, perhaps the problem is that the order of the items in the Hashicorp, please confirm:
These things need to be clarified and documented if we are going to stand a chance to deal with this. Otherwise it's like boxing blindfolded. Our policy is 200 lines long, all I know is that some part is considered different, but not which part..
|
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @FransUrbo as hashicorp/terraform#10467. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
0.7.13
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Creating the resource on the first run, nothing on subsequent runs.
Actual Behavior
Resource is modified every time, even though no changes to it have been done.
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: