-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: Ignore order of client IDs in iam_openid_connect_provider #31253
fix: Ignore order of client IDs in iam_openid_connect_provider #31253
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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 testacc TESTARGS='-run=TestAccIAMOpenIDConnectProvider_' PKG=iam ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3 -run=TestAccIAMOpenIDConnectProvider_ -timeout 180m
=== RUN TestAccIAMOpenIDConnectProvider_basic
=== PAUSE TestAccIAMOpenIDConnectProvider_basic
=== RUN TestAccIAMOpenIDConnectProvider_tags
=== PAUSE TestAccIAMOpenIDConnectProvider_tags
=== RUN TestAccIAMOpenIDConnectProvider_disappears
=== PAUSE TestAccIAMOpenIDConnectProvider_disappears
=== RUN TestAccIAMOpenIDConnectProvider_clientIdListOrder
=== PAUSE TestAccIAMOpenIDConnectProvider_clientIdListOrder
=== CONT TestAccIAMOpenIDConnectProvider_basic
=== CONT TestAccIAMOpenIDConnectProvider_disappears
=== CONT TestAccIAMOpenIDConnectProvider_clientIdListOrder
--- PASS: TestAccIAMOpenIDConnectProvider_disappears (13.01s)
=== CONT TestAccIAMOpenIDConnectProvider_tags
--- PASS: TestAccIAMOpenIDConnectProvider_clientIdListOrder (21.04s)
--- PASS: TestAccIAMOpenIDConnectProvider_basic (27.30s)
--- PASS: TestAccIAMOpenIDConnectProvider_tags (34.64s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 53.194s
This functionality has been released in v4.67.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! |
👋 Just for the notice, this is a breaking change for users that are using this output as a list. |
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. |
Description
When creating an
aws_iam_openid_connect_provider
today, AWS does not seem to preserve the order of values provided inclient_id_list
. Functionally this is not a problem, but it does lead to #29868 where subsequent applies will lead to non-empty plans, as Terraform attempts to 'correct' the order (unless the order given in your.tf
file happens to match AWS).This PR addresses that by defining a new
DiffSuppressFunc
for this use case, which suppresses a diff if a 'new' element is found in the list of client_ids present on the current state. As long as your changes only affect the order, there will be no diff and therefore no plan. It should be noted though that once you do change somethign else than the order (i.e. add/remove client ids), the shown diff will still show that Terraform is attempting to change the order.Should the implementation on AWS side change, this addition will not break (though it will of course be made redundant).
Relations
Relates to #29868 - please help comment if this should 'close' the issue as well. I originally stumbled on this issue when using the terraform-aws-oidc-github module (see relevant issue).
References
N/A
Output from Acceptance Testing