-
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
iam/role: If inline fails, role fails #38477
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Thank you for your contribution! 🚀 A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored. For additional information refer to the AWS SDK for Go Versions page in the contributor guide. |
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccRoleConfig_policyInlineMalformed(rName, rName), | ||
ExpectError: regexache.MustCompile(`MalformedPolicyDocument`), |
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.
This is a little tough to test fully because Check
doesn't run if an error is encountered. I would like to do a testAccCheckRoleDestroy
to make sure it's gone before the destroy phase, but, I verified by tracing execution that the role is deleted in this case.
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 PKG=iam TESTS=TestAccIAMRole_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRole_' -timeout 360m
--- PASS: TestAccIAMRole_badJSON (4.58s)
=== CONT TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_InlinePolicy_malformed (13.73s)
=== CONT TestAccIAMRole_namePrefix
--- PASS: TestAccIAMRole_disappears (25.88s)
=== CONT TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMRole_InlinePolicy_empty (26.11s)
=== CONT TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== CONT TestAccIAMRole_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccIAMRole_namePrefix (33.27s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (51.75s)
=== CONT TestAccIAMRole_basic
--- PASS: TestAccIAMRole_policiesForceDetach (51.84s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (51.98s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (53.29s)
=== CONT TestAccIAMRole_tags_ComputedTag_OnCreate
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (53.52s)
=== CONT TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (53.85s)
=== CONT TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (53.96s)
=== CONT TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccIAMRole_testNameChange (51.90s)
=== CONT TestAccIAMRole_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccIAMRole_nameGenerated (35.28s)
=== CONT TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (62.74s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccIAMRole_maxSessionDuration (69.36s)
=== CONT TestAccIAMRole_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (47.76s)
=== CONT TestAccIAMRole_tags_DefaultTags_overlapping
--- PASS: TestAccIAMRole_ManagedPolicy_basic (75.71s)
=== CONT TestAccIAMRole_tags_DefaultTags_nonOverlapping
--- PASS: TestAccIAMRole_description (79.39s)
=== CONT TestAccIAMRole_tags_DefaultTags_providerOnly
--- PASS: TestAccIAMRole_InlinePolicy_basic (79.47s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnCreate
--- PASS: TestAccIAMRole_basic (39.91s)
=== CONT TestAccIAMRole_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccIAMRole_tags_ComputedTag_OnCreate (42.65s)
=== CONT TestAccIAMRole_tags_AddOnUpdate
--- PASS: TestAccIAMRole_tags_DefaultTags_emptyProviderOnlyTag (42.67s)
=== CONT TestAccIAMRole_tags_null
--- PASS: TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag (43.00s)
--- PASS: TestAccIAMRole_tags_DefaultTags_nullNonOverlappingResourceTag (43.62s)
--- PASS: TestAccIAMRole_tags_DefaultTags_emptyResourceTag (42.21s)
--- PASS: TestAccIAMRole_diffsCondition (111.65s)
--- PASS: TestAccIAMRole_tags_DefaultTags_updateToResourceOnly (65.94s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (58.22s)
--- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Add (68.56s)
--- PASS: TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace (69.05s)
--- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace (60.54s)
--- PASS: TestAccIAMRole_tags_DefaultTags_updateToProviderOnly (58.37s)
--- PASS: TestAccIAMRole_permissionsBoundary (132.13s)
--- PASS: TestAccIAMRole_tags (132.50s)
--- PASS: TestAccIAMRole_tags_null (37.38s)
--- PASS: TestAccIAMRole_tags_EmptyTag_OnCreate (56.34s)
--- PASS: TestAccIAMRole_tags_AddOnUpdate (42.46s)
--- PASS: TestAccIAMRole_tags_DefaultTags_nonOverlapping (70.72s)
--- PASS: TestAccIAMRole_tags_DefaultTags_overlapping (73.70s)
--- PASS: TestAccIAMRole_tags_EmptyTag_OnUpdate_Add (56.78s)
--- PASS: TestAccIAMRole_tags_DefaultTags_providerOnly (78.09s)
--- PASS: TestAccIAMRole_diffs (202.07s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 207.935s
This functionality has been released in v5.60.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
Relations
Closes #23124
References
Output from Acceptance Testing