-
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
fix(iam): the order of service principals should not matter #25967
fix(iam): the order of service principals should not matter #25967
Conversation
ae39230
to
530da4d
Compare
530da4d
to
94e2e67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @pierresouchay 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Hello @justinretzolk, Can someone approve the workflow of checks to see if everything is working as expected? Regards |
Hello @justinretzolk, I added a changelog entry, does the PR meets your requirements or is it something missing? Regards |
Hey @pierresouchay 👋 Thank you for checking in on this. Unfortunately, I'm not able to provide an estimate on when this will be reviewed due to the potential of shifting priorities (we prioritize work by count of ":+1:" reactions, as well as a few other things). For more information on how we prioritize, check out out prioritization guide. That said, on a quick glance, everything appears to be in order for review, once the maintainers are able to prioritize this 🙂. |
As depicted here hashicorp#9042 (comment) It seems the order of services is not predictable, causing Terraform to think it has changes to perform This change avoid this by sorting the order always in the same predictable order
d7c61c1
to
802c65b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make t T=TestPolicyUnmarshalServicePrincipalOrder K=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestPolicyUnmarshalServicePrincipalOrder' -timeout 360m
=== RUN TestPolicyUnmarshalServicePrincipalOrder
--- PASS: TestPolicyUnmarshalServicePrincipalOrder (0.00s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 2.291s
% make t T=TestAccIAMPolicyDocumentDataSource_ K=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMPolicyDocumentDataSource_' -timeout 360m
=== RUN TestAccIAMPolicyDocumentDataSource_basic
=== PAUSE TestAccIAMPolicyDocumentDataSource_basic
=== RUN TestAccIAMPolicyDocumentDataSource_singleConditionValue
=== PAUSE TestAccIAMPolicyDocumentDataSource_singleConditionValue
=== RUN TestAccIAMPolicyDocumentDataSource_multipleConditionKeys
=== PAUSE TestAccIAMPolicyDocumentDataSource_multipleConditionKeys
=== RUN TestAccIAMPolicyDocumentDataSource_duplicateConditionKeys
=== PAUSE TestAccIAMPolicyDocumentDataSource_duplicateConditionKeys
=== RUN TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== PAUSE TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== RUN TestAccIAMPolicyDocumentDataSource_source
=== PAUSE TestAccIAMPolicyDocumentDataSource_source
=== RUN TestAccIAMPolicyDocumentDataSource_sourceList
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceList
=== RUN TestAccIAMPolicyDocumentDataSource_sourceConflicting
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceConflicting
=== RUN TestAccIAMPolicyDocumentDataSource_sourceListConflicting
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceListConflicting
=== RUN TestAccIAMPolicyDocumentDataSource_override
=== PAUSE TestAccIAMPolicyDocumentDataSource_override
=== RUN TestAccIAMPolicyDocumentDataSource_overrideList
=== PAUSE TestAccIAMPolicyDocumentDataSource_overrideList
=== RUN TestAccIAMPolicyDocumentDataSource_noStatementMerge
=== PAUSE TestAccIAMPolicyDocumentDataSource_noStatementMerge
=== RUN TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== PAUSE TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== RUN TestAccIAMPolicyDocumentDataSource_duplicateSid
=== PAUSE TestAccIAMPolicyDocumentDataSource_duplicateSid
=== RUN TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
=== RUN TestAccIAMPolicyDocumentDataSource_version20081017
=== PAUSE TestAccIAMPolicyDocumentDataSource_version20081017
=== CONT TestAccIAMPolicyDocumentDataSource_basic
=== CONT TestAccIAMPolicyDocumentDataSource_overrideList
=== CONT TestAccIAMPolicyDocumentDataSource_source
=== CONT TestAccIAMPolicyDocumentDataSource_duplicateConditionKeys
=== CONT TestAccIAMPolicyDocumentDataSource_multipleConditionKeys
=== CONT TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== CONT TestAccIAMPolicyDocumentDataSource_sourceListConflicting
=== CONT TestAccIAMPolicyDocumentDataSource_noStatementMerge
=== CONT TestAccIAMPolicyDocumentDataSource_singleConditionValue
=== CONT TestAccIAMPolicyDocumentDataSource_sourceList
=== CONT TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
=== CONT TestAccIAMPolicyDocumentDataSource_version20081017
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
=== CONT TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
=== CONT TestAccIAMPolicyDocumentDataSource_duplicateSid
=== CONT TestAccIAMPolicyDocumentDataSource_sourceConflicting
=== CONT TestAccIAMPolicyDocumentDataSource_override
=== CONT TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== NAME TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
policy_document_data_source_test.go:390: skipping tests; current partition (aws) does not equal aws-us-gov
--- SKIP: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov (0.43s)
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceListConflicting (8.30s)
--- PASS: TestAccIAMPolicyDocumentDataSource_multipleConditionKeys (38.62s)
--- PASS: TestAccIAMPolicyDocumentDataSource_duplicateConditionKeys (38.66s)
--- PASS: TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue (38.78s)
--- PASS: TestAccIAMPolicyDocumentDataSource_overrideList (38.82s)
--- PASS: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals (39.09s)
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceList (39.13s)
--- PASS: TestAccIAMPolicyDocumentDataSource_basic (39.13s)
--- PASS: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice (39.13s)
--- PASS: TestAccIAMPolicyDocumentDataSource_singleConditionValue (39.14s)
--- PASS: TestAccIAMPolicyDocumentDataSource_noStatementMerge (39.14s)
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceConflicting (39.14s)
--- PASS: TestAccIAMPolicyDocumentDataSource_noStatementOverride (39.18s)
--- PASS: TestAccIAMPolicyDocumentDataSource_override (39.18s)
--- PASS: TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON (39.99s)
--- PASS: TestAccIAMPolicyDocumentDataSource_duplicateSid (40.28s)
--- PASS: TestAccIAMPolicyDocumentDataSource_version20081017 (45.59s)
--- PASS: TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON (46.34s)
--- PASS: TestAccIAMPolicyDocumentDataSource_source (46.41s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 48.834s
This functionality has been released in v5.46.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 pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
As depicted here #9042 (comment)
It seems the order of services is not predictable, causing Terraform to think it has changes to perform
This change avoid this by sorting the order always in the same predictable order
Community Note
Relates #9042