-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Order lost in aws_iam_role
causing endless plan updates due to ordering of principals in aws_iam_policy_document
#22274
Comments
The symptoms also occur for lists of Federated principals: # aws_iam_role.foo has been changed
~ resource "aws_iam_role" "foo" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Principal = {
~ Federated = [
- "arn:aws:iam::ACCOUNTID:saml-provider/saml-provider-a",
"arn:aws:iam::ACCOUNTID:saml-provider/saml-provider-b",
+ "arn:aws:iam::ACCOUNTID:saml-provider/saml-provider-a",
]
}
# (3 unchanged elements hidden)
},
]
# (1 unchanged element hidden)
}
)
id = "foo"
name = "foo"
# (7 unchanged attributes hidden)
} This issue was reported here #11801 (comment) which was a big and messy issue with many different variations so was overlooked during the many related fixes that went in to v3.70 |
Same issue described here with |
Should we continue collecting places where this bites us, or would you prefer independent bugs? I don't think I've seen this case mentioned yet. (This was in the "changes made outside of Terraform" portion of the output.)
Edited to add: Terraform 1.1.3, AWS provider 3.72.0 |
Me too. Many differences in plan reported now that did not report differences in terraform 0.13. Version info: Terraform v1.1.4
|
Hi! I've created a Pull Request to fix this Issue. |
This functionality has been released in v4.23.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. 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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.1
on linux_amd64
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
Panic Output
Expected Behavior
When running multiple plans with no changes to the terraform code terraform should detect no changes
Actual Behavior
When running multiple plans the outputs are updated on every plan due to reordering of the principals
Steps to Reproduce
terraform plan
terraform apply
terraform plan
Important Factoids
References
aws_iam_policy_document
when applied to S3 buckets, iam roles, kms keys, etc #11801The text was updated successfully, but these errors were encountered: