-
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
service/iam: retry attaching policy on ConcurrentModificationException #34378
Conversation
Fixes hashicorp#34371 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
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.
Welcome @flichtenheld 👋
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 CONTRIBUTOR 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! 😃
% make testacc TESTARGS='-run=TestAccIAMGroupPolicyAttachment_' PKG=iam ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMGroupPolicyAttachment_ -timeout 360m === RUN TestAccIAMGroupPolicyAttachment_basic === PAUSE TestAccIAMGroupPolicyAttachment_basic === RUN TestAccIAMGroupPolicyAttachment_disappears === PAUSE TestAccIAMGroupPolicyAttachment_disappears === CONT TestAccIAMGroupPolicyAttachment_basic === CONT TestAccIAMGroupPolicyAttachment_disappears --- PASS: TestAccIAMGroupPolicyAttachment_disappears (21.23s) --- PASS: TestAccIAMGroupPolicyAttachment_basic (38.74s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 44.687s
% make testacc TESTARGS='-run=TestAccIAMUserPolicyAttachment_' PKG=iam ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMUserPolicyAttachment_ -timeout 360m === RUN TestAccIAMUserPolicyAttachment_basic === PAUSE TestAccIAMUserPolicyAttachment_basic === RUN TestAccIAMUserPolicyAttachment_disappears === PAUSE TestAccIAMUserPolicyAttachment_disappears === CONT TestAccIAMUserPolicyAttachment_basic === CONT TestAccIAMUserPolicyAttachment_disappears --- PASS: TestAccIAMUserPolicyAttachment_disappears (23.71s) --- PASS: TestAccIAMUserPolicyAttachment_basic (41.76s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 47.241s
% make testacc TESTARGS='-run=TestAccIAMRolePolicyAttachment_' PKG=iam ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMRolePolicyAttachment_ -timeout 360m === RUN TestAccIAMRolePolicyAttachment_basic === PAUSE TestAccIAMRolePolicyAttachment_basic === RUN TestAccIAMRolePolicyAttachment_disappears === PAUSE TestAccIAMRolePolicyAttachment_disappears === RUN TestAccIAMRolePolicyAttachment_Disappears_role === PAUSE TestAccIAMRolePolicyAttachment_Disappears_role === CONT TestAccIAMRolePolicyAttachment_basic === CONT TestAccIAMRolePolicyAttachment_Disappears_role === CONT TestAccIAMRolePolicyAttachment_disappears --- PASS: TestAccIAMRolePolicyAttachment_Disappears_role (28.46s) --- PASS: TestAccIAMRolePolicyAttachment_disappears (28.48s) --- PASS: TestAccIAMRolePolicyAttachment_basic (47.56s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 53.610s
% make testacc TESTARGS='-run=TestAccIAMPolicyAttachment_' PKG=iam ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMPolicyAttachment_ -timeout 360m === RUN TestAccIAMPolicyAttachment_basic === PAUSE TestAccIAMPolicyAttachment_basic === RUN TestAccIAMPolicyAttachment_disappears === PAUSE TestAccIAMPolicyAttachment_disappears === RUN TestAccIAMPolicyAttachment_paginatedEntities === PAUSE TestAccIAMPolicyAttachment_paginatedEntities === CONT TestAccIAMPolicyAttachment_basic === CONT TestAccIAMPolicyAttachment_paginatedEntities === CONT TestAccIAMPolicyAttachment_disappears --- PASS: TestAccIAMPolicyAttachment_disappears (30.25s) --- PASS: TestAccIAMPolicyAttachment_basic (40.91s) --- PASS: TestAccIAMPolicyAttachment_paginatedEntities (78.31s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 84.067s
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=TestAccIAMGroupPolicyAttachment_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMGroupPolicyAttachment_ -timeout 360m
=== RUN TestAccIAMGroupPolicyAttachment_basic
=== PAUSE TestAccIAMGroupPolicyAttachment_basic
=== RUN TestAccIAMGroupPolicyAttachment_disappears
=== PAUSE TestAccIAMGroupPolicyAttachment_disappears
=== CONT TestAccIAMGroupPolicyAttachment_basic
=== CONT TestAccIAMGroupPolicyAttachment_disappears
--- PASS: TestAccIAMGroupPolicyAttachment_disappears (21.23s)
--- PASS: TestAccIAMGroupPolicyAttachment_basic (38.74s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 44.687s
% make testacc TESTARGS='-run=TestAccIAMUserPolicyAttachment_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMUserPolicyAttachment_ -timeout 360m
=== RUN TestAccIAMUserPolicyAttachment_basic
=== PAUSE TestAccIAMUserPolicyAttachment_basic
=== RUN TestAccIAMUserPolicyAttachment_disappears
=== PAUSE TestAccIAMUserPolicyAttachment_disappears
=== CONT TestAccIAMUserPolicyAttachment_basic
=== CONT TestAccIAMUserPolicyAttachment_disappears
--- PASS: TestAccIAMUserPolicyAttachment_disappears (23.71s)
--- PASS: TestAccIAMUserPolicyAttachment_basic (41.76s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 47.241s
% make testacc TESTARGS='-run=TestAccIAMRolePolicyAttachment_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMRolePolicyAttachment_ -timeout 360m
=== RUN TestAccIAMRolePolicyAttachment_basic
=== PAUSE TestAccIAMRolePolicyAttachment_basic
=== RUN TestAccIAMRolePolicyAttachment_disappears
=== PAUSE TestAccIAMRolePolicyAttachment_disappears
=== RUN TestAccIAMRolePolicyAttachment_Disappears_role
=== PAUSE TestAccIAMRolePolicyAttachment_Disappears_role
=== CONT TestAccIAMRolePolicyAttachment_basic
=== CONT TestAccIAMRolePolicyAttachment_Disappears_role
=== CONT TestAccIAMRolePolicyAttachment_disappears
--- PASS: TestAccIAMRolePolicyAttachment_Disappears_role (28.46s)
--- PASS: TestAccIAMRolePolicyAttachment_disappears (28.48s)
--- PASS: TestAccIAMRolePolicyAttachment_basic (47.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 53.610s
% make testacc TESTARGS='-run=TestAccIAMPolicyAttachment_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMPolicyAttachment_ -timeout 360m
=== RUN TestAccIAMPolicyAttachment_basic
=== PAUSE TestAccIAMPolicyAttachment_basic
=== RUN TestAccIAMPolicyAttachment_disappears
=== PAUSE TestAccIAMPolicyAttachment_disappears
=== RUN TestAccIAMPolicyAttachment_paginatedEntities
=== PAUSE TestAccIAMPolicyAttachment_paginatedEntities
=== CONT TestAccIAMPolicyAttachment_basic
=== CONT TestAccIAMPolicyAttachment_paginatedEntities
=== CONT TestAccIAMPolicyAttachment_disappears
--- PASS: TestAccIAMPolicyAttachment_disappears (30.25s)
--- PASS: TestAccIAMPolicyAttachment_basic (40.91s)
--- PASS: TestAccIAMPolicyAttachment_paginatedEntities (78.31s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 84.067s
% make testacc TESTARGS='-run=TestAccIAMPolicy_' 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=TestAccIAMPolicy_ -timeout 360m
=== RUN TestAccIAMPolicy_basic
=== PAUSE TestAccIAMPolicy_basic
=== RUN TestAccIAMPolicy_description
=== PAUSE TestAccIAMPolicy_description
=== RUN TestAccIAMPolicy_tags
=== PAUSE TestAccIAMPolicy_tags
=== RUN TestAccIAMPolicy_disappears
=== PAUSE TestAccIAMPolicy_disappears
=== RUN TestAccIAMPolicy_namePrefix
=== PAUSE TestAccIAMPolicy_namePrefix
=== RUN TestAccIAMPolicy_path
=== PAUSE TestAccIAMPolicy_path
=== RUN TestAccIAMPolicy_policy
=== PAUSE TestAccIAMPolicy_policy
=== RUN TestAccIAMPolicy_diffs
=== PAUSE TestAccIAMPolicy_diffs
=== RUN TestAccIAMPolicy_policyDuplicateKeys
=== PAUSE TestAccIAMPolicy_policyDuplicateKeys
=== CONT TestAccIAMPolicy_basic
=== CONT TestAccIAMPolicy_path
=== CONT TestAccIAMPolicy_diffs
--- PASS: TestAccIAMPolicy_path (32.52s)
=== CONT TestAccIAMPolicy_policyDuplicateKeys
--- PASS: TestAccIAMPolicy_basic (32.57s)
=== CONT TestAccIAMPolicy_policy
--- PASS: TestAccIAMPolicy_policyDuplicateKeys (3.11s)
=== CONT TestAccIAMPolicy_disappears
=== CONT TestAccIAMPolicy_namePrefix
--- PASS: TestAccIAMPolicy_disappears (23.77s)
--- PASS: TestAccIAMPolicy_policy (54.94s)
=== CONT TestAccIAMPolicy_tags
--- PASS: TestAccIAMPolicy_namePrefix (32.54s)
=== CONT TestAccIAMPolicy_description
--- PASS: TestAccIAMPolicy_description (32.88s)
--- PASS: TestAccIAMPolicy_tags (68.61s)
--- PASS: TestAccIAMPolicy_diffs (195.55s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 201.652s
@flichtenheld Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.26.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. |
Description
Seems like AWS IAM now returns ConcurrentModification when previously this was not a problem.
Just retry the operation like we do in other parts of the code.
Relations
Closes #34371
References
Output from Acceptance Testing