-
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
Terraform shows diff for policy due to different order in JSON #22314
Comments
Also an issue for aws_iam_openid_connect_provider. The client_id_list in AWS, the "audiences", doesn't reflect what is in the code. More details to come. |
this has been driving me crazy lately, if it's the same thing - smells like the same thing. |
I have an S3 bucket policy doing the same thing.
When I execute
However, when I execute
When I pull the policy from a hardcoded file, it works as expected, i.e. |
Also, from my perspective, this is not an "enhancement" - it is a bug, plain and simple. The ordering of resources is owned by the AWS API, and terraform should not cause users trouble (like a day of debugging time) by changing that order in any manner. |
I have what I think is a slightly different view of the issue, and a proposed solution.
|
That makes good sense - insulating the terraform state from changes to API return ordering should solve this problem. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
https://gist.github.com/anthonyAdhese/861b3bba3dfe2f6e55b4da676af7600f
Panic Output
Expected Behavior
There shouldn't be any diff due to a difference in json order that is received from AWS.
Actual Behavior
For each policy we now get a diff that is probably bogus but isn't visible in the output when running Terraform plan.
Steps to Reproduce
terraform plan
Important Factoids
References
The text was updated successfully, but these errors were encountered: