-
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
r/aws_iam_role: retry ConcurrentModificationException
s
#39429
Conversation
Community NoteVoting for Prioritization
For Submitters
|
This condition is not easily reproducible, but has been the subject of a regression report. This change will retry `ConcurrentModificationException`s during role creation, alongside other retryable conditions resulting from IAM propagation delays. From the [`CreateRole` API documentation](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html#API_CreateRole_Errors). > ConcurrentModification > The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again. ```console % make testacc PKG=iam TESTS=TestAccIAMRole_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.7 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRole_' -timeout 360m --- PASS: TestAccIAMRole_badJSON (10.88s) === CONT TestAccIAMRole_nameGenerated --- PASS: TestAccIAMRole_InlinePolicy_malformed (21.38s) === CONT TestAccIAMRole_description --- PASS: TestAccIAMRole_InlinePolicy_empty (28.70s) === CONT TestAccIAMRole_basic --- PASS: TestAccIAMRole_nameGenerated (35.52s) === CONT TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace --- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace (52.89s) === CONT TestAccIAMRole_diffs --- PASS: TestAccIAMRole_disappears (54.05s) === CONT TestAccIAMRole_tags_DefaultTags_overlapping --- PASS: TestAccIAMRole_tags_DefaultTags_updateToResourceOnly (57.77s) === CONT TestAccIAMRole_tags_DefaultTags_updateToProviderOnly --- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (62.09s) === CONT TestAccIAMRole_InlinePolicy_basic --- PASS: TestAccIAMRole_namePrefix (71.49s) === CONT TestAccIAMRole_InlinePolicy_ignoreOrder --- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (72.09s) === CONT TestAccIAMRole_tags_AddOnUpdate --- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (74.20s) === CONT TestAccIAMRole_tags_EmptyTag_OnUpdate_Add --- PASS: TestAccIAMRole_policiesForceDetach (74.46s) === CONT TestAccIAMRole_tags_EmptyTag_OnCreate --- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (82.70s) === CONT TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag --- PASS: TestAccIAMRole_basic (61.09s) === CONT TestAccIAMRole_tags_ComputedTag_OnCreate --- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (96.43s) === CONT TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag --- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (106.90s) === CONT TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag --- PASS: TestAccIAMRole_ManagedPolicy_basic (106.95s) === CONT TestAccIAMRole_permissionsBoundary --- PASS: TestAccIAMRole_diffsCondition (114.92s) === CONT TestAccIAMRole_testNameChange --- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (122.50s) === CONT TestAccIAMRole_maxSessionDuration --- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace (83.01s) === CONT TestAccIAMRole_tags_DefaultTags_nonOverlapping --- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Add (135.98s) === CONT TestAccIAMRole_tags_DefaultTags_providerOnly --- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (138.94s) === CONT TestAccIAMRole_tags_DefaultTags_emptyResourceTag --- PASS: TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag (56.54s) === CONT TestAccIAMRole_tags_EmptyMap --- PASS: TestAccIAMRole_description (123.07s) === CONT TestAccIAMRole_tags_null --- PASS: TestAccIAMRole_tags_DefaultTags_updateToProviderOnly (90.71s) --- PASS: TestAccIAMRole_tags_ComputedTag_OnCreate (61.96s) --- PASS: TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag (64.97s) --- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (94.18s) --- PASS: TestAccIAMRole_tags_AddOnUpdate (97.70s) --- PASS: TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag (63.14s) --- PASS: TestAccIAMRole_InlinePolicy_basic (114.38s) --- PASS: TestAccIAMRole_tags_EmptyTag_OnCreate (104.03s) --- PASS: TestAccIAMRole_tags (181.54s) --- PASS: TestAccIAMRole_testNameChange (72.33s) --- PASS: TestAccIAMRole_tags_DefaultTags_emptyResourceTag (50.75s) --- PASS: TestAccIAMRole_tags_DefaultTags_overlapping (137.33s) --- PASS: TestAccIAMRole_tags_EmptyMap (54.34s) --- PASS: TestAccIAMRole_tags_null (49.84s) --- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Add (120.75s) --- PASS: TestAccIAMRole_maxSessionDuration (75.97s) --- PASS: TestAccIAMRole_tags_DefaultTags_nonOverlapping (85.89s) --- PASS: TestAccIAMRole_permissionsBoundary (115.88s) --- PASS: TestAccIAMRole_tags_DefaultTags_providerOnly (94.41s) --- PASS: TestAccIAMRole_diffs (235.49s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 293.586s ```
4fa6a29
to
54ccfc6
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 testacc TESTARGS='-run=TestAccIAMRole_' PKG=iam ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/iam/... -v -count 1 -parallel 4 -run=TestAccIAMRole_ -timeout 360m
=== RUN TestAccIAMRole_tags
=== PAUSE TestAccIAMRole_tags
=== RUN TestAccIAMRole_tags_null
=== PAUSE TestAccIAMRole_tags_null
=== RUN TestAccIAMRole_tags_EmptyMap
=== PAUSE TestAccIAMRole_tags_EmptyMap
=== RUN TestAccIAMRole_tags_AddOnUpdate
=== PAUSE TestAccIAMRole_tags_AddOnUpdate
=== RUN TestAccIAMRole_tags_EmptyTag_OnCreate
=== PAUSE TestAccIAMRole_tags_EmptyTag_OnCreate
=== RUN TestAccIAMRole_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccIAMRole_tags_EmptyTag_OnUpdate_Add
=== RUN TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace
=== RUN TestAccIAMRole_tags_DefaultTags_providerOnly
=== PAUSE TestAccIAMRole_tags_DefaultTags_providerOnly
=== RUN TestAccIAMRole_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccIAMRole_tags_DefaultTags_nonOverlapping
=== RUN TestAccIAMRole_tags_DefaultTags_overlapping
=== PAUSE TestAccIAMRole_tags_DefaultTags_overlapping
=== RUN TestAccIAMRole_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccIAMRole_tags_DefaultTags_updateToProviderOnly
=== RUN TestAccIAMRole_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccIAMRole_tags_DefaultTags_updateToResourceOnly
=== RUN TestAccIAMRole_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccIAMRole_tags_DefaultTags_emptyResourceTag
=== RUN TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag
=== RUN TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag
=== RUN TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN TestAccIAMRole_tags_ComputedTag_OnCreate
=== PAUSE TestAccIAMRole_tags_ComputedTag_OnCreate
=== RUN TestAccIAMRole_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccIAMRole_tags_ComputedTag_OnUpdate_Add
=== RUN TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace
=== RUN TestAccIAMRole_basic
=== PAUSE TestAccIAMRole_basic
=== RUN TestAccIAMRole_description
=== PAUSE TestAccIAMRole_description
=== RUN TestAccIAMRole_nameGenerated
=== PAUSE TestAccIAMRole_nameGenerated
=== RUN TestAccIAMRole_namePrefix
=== PAUSE TestAccIAMRole_namePrefix
=== RUN TestAccIAMRole_testNameChange
=== PAUSE TestAccIAMRole_testNameChange
=== RUN TestAccIAMRole_diffs
=== PAUSE TestAccIAMRole_diffs
=== RUN TestAccIAMRole_diffsCondition
=== PAUSE TestAccIAMRole_diffsCondition
=== RUN TestAccIAMRole_badJSON
=== PAUSE TestAccIAMRole_badJSON
=== RUN TestAccIAMRole_disappears
=== PAUSE TestAccIAMRole_disappears
=== RUN TestAccIAMRole_policiesForceDetach
=== PAUSE TestAccIAMRole_policiesForceDetach
=== RUN TestAccIAMRole_maxSessionDuration
=== PAUSE TestAccIAMRole_maxSessionDuration
=== RUN TestAccIAMRole_permissionsBoundary
=== PAUSE TestAccIAMRole_permissionsBoundary
=== RUN TestAccIAMRole_InlinePolicy_basic
=== PAUSE TestAccIAMRole_InlinePolicy_basic
=== RUN TestAccIAMRole_InlinePolicy_ignoreOrder
=== PAUSE TestAccIAMRole_InlinePolicy_ignoreOrder
=== RUN TestAccIAMRole_InlinePolicy_empty
=== PAUSE TestAccIAMRole_InlinePolicy_empty
=== RUN TestAccIAMRole_InlinePolicy_malformed
=== PAUSE TestAccIAMRole_InlinePolicy_malformed
=== RUN TestAccIAMRole_ManagedPolicy_basic
=== PAUSE TestAccIAMRole_ManagedPolicy_basic
=== RUN TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== RUN TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== RUN TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== RUN TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== RUN TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== RUN TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== RUN TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== RUN TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== CONT TestAccIAMRole_tags
=== CONT TestAccIAMRole_namePrefix
=== CONT TestAccIAMRole_tags_DefaultTags_updateToResourceOnly
=== CONT TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMRole_namePrefix (13.47s)
=== CONT TestAccIAMRole_description
--- PASS: TestAccIAMRole_nameGenerated (13.51s)
=== CONT TestAccIAMRole_basic
--- PASS: TestAccIAMRole_tags_DefaultTags_updateToResourceOnly (21.63s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccIAMRole_basic (12.36s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccIAMRole_description (27.25s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnCreate
--- PASS: TestAccIAMRole_tags (47.70s)
=== CONT TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace (26.33s)
=== CONT TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Add (26.32s)
=== CONT TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccIAMRole_tags_ComputedTag_OnCreate (17.14s)
=== CONT TestAccIAMRole_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag (13.99s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag (13.82s)
=== CONT TestAccIAMRole_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag (13.93s)
=== CONT TestAccIAMRole_tags_DefaultTags_overlapping
--- PASS: TestAccIAMRole_tags_DefaultTags_emptyResourceTag (14.01s)
=== CONT TestAccIAMRole_tags_DefaultTags_nonOverlapping
--- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace (22.60s)
=== CONT TestAccIAMRole_tags_DefaultTags_providerOnly
--- PASS: TestAccIAMRole_tags_DefaultTags_updateToProviderOnly (22.88s)
=== CONT TestAccIAMRole_tags_AddOnUpdate
--- PASS: TestAccIAMRole_tags_DefaultTags_overlapping (37.31s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccIAMRole_tags_AddOnUpdate (22.51s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnCreate
--- PASS: TestAccIAMRole_tags_DefaultTags_nonOverlapping (36.77s)
=== CONT TestAccIAMRole_tags_EmptyMap
--- PASS: TestAccIAMRole_tags_EmptyMap (16.92s)
=== CONT TestAccIAMRole_tags_null
--- PASS: TestAccIAMRole_tags_EmptyTag_OnCreate (24.94s)
=== CONT TestAccIAMRole_InlinePolicy_empty
--- PASS: TestAccIAMRole_tags_DefaultTags_providerOnly (48.36s)
=== CONT TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Add (33.61s)
=== CONT TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_InlinePolicy_empty (9.98s)
=== CONT TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_tags_null (16.97s)
=== CONT TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (18.04s)
=== CONT TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (18.73s)
=== CONT TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (18.72s)
=== CONT TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (25.60s)
=== CONT TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (21.18s)
=== CONT TestAccIAMRole_ManagedPolicy_basic
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (20.40s)
=== CONT TestAccIAMRole_InlinePolicy_malformed
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (18.58s)
=== CONT TestAccIAMRole_policiesForceDetach
--- PASS: TestAccIAMRole_InlinePolicy_malformed (5.03s)
=== CONT TestAccIAMRole_InlinePolicy_ignoreOrder
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (19.08s)
=== CONT TestAccIAMRole_InlinePolicy_basic
--- PASS: TestAccIAMRole_policiesForceDetach (13.02s)
=== CONT TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_ManagedPolicy_basic (28.88s)
=== CONT TestAccIAMRole_maxSessionDuration
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (21.97s)
=== CONT TestAccIAMRole_diffsCondition
--- PASS: TestAccIAMRole_InlinePolicy_basic (28.06s)
=== CONT TestAccIAMRole_disappears
=== CONT TestAccIAMRole_badJSON
--- PASS: TestAccIAMRole_maxSessionDuration (23.39s)
--- PASS: TestAccIAMRole_badJSON (1.39s)
=== CONT TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_disappears (10.61s)
=== CONT TestAccIAMRole_diffs
--- PASS: TestAccIAMRole_permissionsBoundary (49.62s)
--- PASS: TestAccIAMRole_diffsCondition (41.51s)
--- PASS: TestAccIAMRole_testNameChange (19.29s)
--- PASS: TestAccIAMRole_diffs (130.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 361.505s
This functionality has been released in v5.69.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
This condition is not easily reproducible, but has been the subject of a regression report. This change will retry
ConcurrentModificationException
s during role creation, alongside other retryable conditions resulting from IAM propagation delays.From the
CreateRole
API documentation.Relations
Closes #39421
Output from Acceptance Testing