Skip to content
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/user: Force destroy with policies #36640

Merged
merged 8 commits into from
Mar 29, 2024
Merged

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Mar 28, 2024

Description

Relations

Closes #12903

References

Output from Acceptance Testing

% make t T=TestAccIAMUser K=iam P=12                       
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/iam/... -v -count 1 -parallel 12 -run='TestAccIAMUser'  -timeout 360m
=== RUN   TestAccIAMUserDataSource_basic
=== PAUSE TestAccIAMUserDataSource_basic
=== RUN   TestAccIAMUserDataSource_tags
=== PAUSE TestAccIAMUserDataSource_tags
=== RUN   TestAccIAMUserGroupMembership_basic
=== PAUSE TestAccIAMUserGroupMembership_basic
=== RUN   TestAccIAMUserLoginProfile_basic
=== PAUSE TestAccIAMUserLoginProfile_basic
=== RUN   TestAccIAMUserLoginProfile_keybase
=== PAUSE TestAccIAMUserLoginProfile_keybase
=== RUN   TestAccIAMUserLoginProfile_keybaseDoesntExist
=== PAUSE TestAccIAMUserLoginProfile_keybaseDoesntExist
=== RUN   TestAccIAMUserLoginProfile_notAKey
=== PAUSE TestAccIAMUserLoginProfile_notAKey
=== RUN   TestAccIAMUserLoginProfile_passwordLength
=== PAUSE TestAccIAMUserLoginProfile_passwordLength
=== RUN   TestAccIAMUserLoginProfile_nogpg
=== PAUSE TestAccIAMUserLoginProfile_nogpg
=== RUN   TestAccIAMUserLoginProfile_disappears
=== PAUSE TestAccIAMUserLoginProfile_disappears
=== RUN   TestAccIAMUserPolicyAttachment_basic
=== PAUSE TestAccIAMUserPolicyAttachment_basic
=== RUN   TestAccIAMUserPolicyAttachment_disappears
=== PAUSE TestAccIAMUserPolicyAttachment_disappears
=== RUN   TestAccIAMUserPolicy_basic
=== PAUSE TestAccIAMUserPolicy_basic
=== RUN   TestAccIAMUserPolicy_disappears
=== PAUSE TestAccIAMUserPolicy_disappears
=== RUN   TestAccIAMUserPolicy_nameGenerated
=== PAUSE TestAccIAMUserPolicy_nameGenerated
=== RUN   TestAccIAMUserPolicy_namePrefix
=== PAUSE TestAccIAMUserPolicy_namePrefix
=== RUN   TestAccIAMUserPolicy_multiplePolicies
=== PAUSE TestAccIAMUserPolicy_multiplePolicies
=== RUN   TestAccIAMUserPolicy_policyOrder
=== PAUSE TestAccIAMUserPolicy_policyOrder
=== RUN   TestAccIAMUserSSHKeyDataSource_basic
=== PAUSE TestAccIAMUserSSHKeyDataSource_basic
=== RUN   TestAccIAMUserSSHKey_basic
=== PAUSE TestAccIAMUserSSHKey_basic
=== RUN   TestAccIAMUserSSHKey_disappears
=== PAUSE TestAccIAMUserSSHKey_disappears
=== RUN   TestAccIAMUserSSHKey_pemEncoding
=== PAUSE TestAccIAMUserSSHKey_pemEncoding
=== RUN   TestAccIAMUser_tags
=== PAUSE TestAccIAMUser_tags
=== RUN   TestAccIAMUser_tags_null
=== PAUSE TestAccIAMUser_tags_null
=== RUN   TestAccIAMUser_tags_AddOnUpdate
=== PAUSE TestAccIAMUser_tags_AddOnUpdate
=== RUN   TestAccIAMUser_tags_EmptyTag_OnCreate
=== PAUSE TestAccIAMUser_tags_EmptyTag_OnCreate
=== RUN   TestAccIAMUser_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccIAMUser_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccIAMUser_tags_DefaultTags_providerOnly
=== PAUSE TestAccIAMUser_tags_DefaultTags_providerOnly
=== RUN   TestAccIAMUser_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccIAMUser_tags_DefaultTags_nonOverlapping
=== RUN   TestAccIAMUser_tags_DefaultTags_overlapping
=== PAUSE TestAccIAMUser_tags_DefaultTags_overlapping
=== RUN   TestAccIAMUser_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccIAMUser_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccIAMUser_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccIAMUser_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccIAMUser_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccIAMUser_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccIAMUser_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccIAMUser_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccIAMUser_basic
=== PAUSE TestAccIAMUser_basic
=== RUN   TestAccIAMUser_disappears
=== PAUSE TestAccIAMUser_disappears
=== RUN   TestAccIAMUser_ForceDestroy_accessKey
=== PAUSE TestAccIAMUser_ForceDestroy_accessKey
=== RUN   TestAccIAMUser_ForceDestroy_loginProfile
=== PAUSE TestAccIAMUser_ForceDestroy_loginProfile
=== RUN   TestAccIAMUser_ForceDestroy_mfaDevice
=== PAUSE TestAccIAMUser_ForceDestroy_mfaDevice
=== RUN   TestAccIAMUser_ForceDestroy_sshKey
=== PAUSE TestAccIAMUser_ForceDestroy_sshKey
=== RUN   TestAccIAMUser_ForceDestroy_serviceSpecificCred
=== PAUSE TestAccIAMUser_ForceDestroy_serviceSpecificCred
=== RUN   TestAccIAMUser_ForceDestroy_signingCertificate
=== PAUSE TestAccIAMUser_ForceDestroy_signingCertificate
=== RUN   TestAccIAMUser_ForceDestroy_policyAttached
=== PAUSE TestAccIAMUser_ForceDestroy_policyAttached
=== RUN   TestAccIAMUser_ForceDestroy_policyInline
=== PAUSE TestAccIAMUser_ForceDestroy_policyInline
=== RUN   TestAccIAMUser_ForceDestroy_policyInlineAttached
=== PAUSE TestAccIAMUser_ForceDestroy_policyInlineAttached
=== RUN   TestAccIAMUser_nameChange
=== PAUSE TestAccIAMUser_nameChange
=== RUN   TestAccIAMUser_pathChange
=== PAUSE TestAccIAMUser_pathChange
=== RUN   TestAccIAMUser_permissionsBoundary
=== PAUSE TestAccIAMUser_permissionsBoundary
=== RUN   TestAccIAMUsersDataSource_nameRegex
=== PAUSE TestAccIAMUsersDataSource_nameRegex
=== RUN   TestAccIAMUsersDataSource_pathPrefix
=== PAUSE TestAccIAMUsersDataSource_pathPrefix
=== RUN   TestAccIAMUsersDataSource_nonExistentNameRegex
=== PAUSE TestAccIAMUsersDataSource_nonExistentNameRegex
=== RUN   TestAccIAMUsersDataSource_nonExistentPathPrefix
=== PAUSE TestAccIAMUsersDataSource_nonExistentPathPrefix
=== CONT  TestAccIAMUserDataSource_basic
=== CONT  TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace
=== CONT  TestAccIAMUserPolicy_nameGenerated
=== CONT  TestAccIAMUserLoginProfile_passwordLength
=== CONT  TestAccIAMUserLoginProfile_keybase
=== CONT  TestAccIAMUserLoginProfile_basic
=== CONT  TestAccIAMUserPolicyAttachment_disappears
=== CONT  TestAccIAMUsersDataSource_nonExistentPathPrefix
=== CONT  TestAccIAMUserDataSource_tags
=== CONT  TestAccIAMUserPolicy_disappears
=== CONT  TestAccIAMUserGroupMembership_basic
=== CONT  TestAccIAMUserLoginProfile_notAKey
--- PASS: TestAccIAMUserLoginProfile_notAKey (16.84s)
=== CONT  TestAccIAMUserPolicy_basic
--- PASS: TestAccIAMUsersDataSource_nonExistentPathPrefix (20.24s)
=== CONT  TestAccIAMUser_ForceDestroy_mfaDevice
--- PASS: TestAccIAMUserDataSource_tags (25.26s)
=== CONT  TestAccIAMUsersDataSource_nonExistentNameRegex
--- PASS: TestAccIAMUserDataSource_basic (27.70s)
=== CONT  TestAccIAMUsersDataSource_pathPrefix
--- PASS: TestAccIAMUserPolicy_disappears (29.84s)
=== CONT  TestAccIAMUsersDataSource_nameRegex
--- PASS: TestAccIAMUserPolicyAttachment_disappears (30.06s)
=== CONT  TestAccIAMUser_permissionsBoundary
--- PASS: TestAccIAMUserPolicy_nameGenerated (36.13s)
=== CONT  TestAccIAMUser_pathChange
--- PASS: TestAccIAMUserLoginProfile_keybase (36.90s)
=== CONT  TestAccIAMUser_nameChange
--- PASS: TestAccIAMUserLoginProfile_passwordLength (36.94s)
=== CONT  TestAccIAMUser_ForceDestroy_loginProfile
--- PASS: TestAccIAMUserLoginProfile_basic (46.13s)
=== CONT  TestAccIAMUser_ForceDestroy_accessKey
--- PASS: TestAccIAMUsersDataSource_nonExistentNameRegex (24.56s)
=== CONT  TestAccIAMUser_disappears
--- PASS: TestAccIAMUsersDataSource_pathPrefix (27.54s)
=== CONT  TestAccIAMUserLoginProfile_keybaseDoesntExist
--- PASS: TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace (57.48s)
=== CONT  TestAccIAMUser_basic
--- PASS: TestAccIAMUsersDataSource_nameRegex (29.24s)
=== CONT  TestAccIAMUser_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccIAMUser_ForceDestroy_mfaDevice (39.13s)
=== CONT  TestAccIAMUser_tags_AddOnUpdate
--- PASS: TestAccIAMUserLoginProfile_keybaseDoesntExist (18.04s)
=== CONT  TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccIAMUser_ForceDestroy_loginProfile (39.58s)
=== CONT  TestAccIAMUser_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccIAMUserPolicy_basic (62.87s)
=== CONT  TestAccIAMUserPolicyAttachment_basic
--- PASS: TestAccIAMUser_disappears (31.61s)
=== CONT  TestAccIAMUserLoginProfile_disappears
--- PASS: TestAccIAMUser_ForceDestroy_accessKey (38.16s)
=== CONT  TestAccIAMUserLoginProfile_nogpg
--- PASS: TestAccIAMUser_tags_DefaultTags_nullNonOverlappingResourceTag (35.78s)
=== CONT  TestAccIAMUserSSHKey_pemEncoding
--- PASS: TestAccIAMUser_nameChange (59.30s)
=== CONT  TestAccIAMUser_tags_EmptyTag_OnCreate
--- PASS: TestAccIAMUser_pathChange (60.14s)
=== CONT  TestAccIAMUserSSHKeyDataSource_basic
--- PASS: TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag (33.64s)
=== CONT  TestAccIAMUser_tags_null
--- PASS: TestAccIAMUser_basic (58.20s)
=== CONT  TestAccIAMUserSSHKey_disappears
--- PASS: TestAccIAMUser_tags_AddOnUpdate (58.74s)
=== CONT  TestAccIAMUser_tags_DefaultTags_overlapping
--- PASS: TestAccIAMUserLoginProfile_nogpg (36.78s)
=== CONT  TestAccIAMUserSSHKey_basic
--- PASS: TestAccIAMUserLoginProfile_disappears (42.09s)
=== CONT  TestAccIAMUser_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccIAMUserSSHKeyDataSource_basic (30.44s)
=== CONT  TestAccIAMUser_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccIAMUserSSHKey_pemEncoding (37.42s)
=== CONT  TestAccIAMUserPolicy_multiplePolicies
--- PASS: TestAccIAMUserPolicyAttachment_basic (58.76s)
=== CONT  TestAccIAMUser_ForceDestroy_policyInlineAttached
--- PASS: TestAccIAMUserSSHKey_disappears (32.53s)
=== CONT  TestAccIAMUser_tags_DefaultTags_nonOverlapping
=== CONT  TestAccIAMUser_ForceDestroy_serviceSpecificCred
--- PASS: TestAccIAMUserGroupMembership_basic (157.02s)
--- PASS: TestAccIAMUser_tags_null (52.26s)
=== CONT  TestAccIAMUser_tags_DefaultTags_providerOnly
--- PASS: TestAccIAMUserSSHKey_basic (40.64s)
=== CONT  TestAccIAMUser_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccIAMUser_tags_DefaultTags_emptyResourceTag (36.90s)
=== CONT  TestAccIAMUser_ForceDestroy_policyInline
--- PASS: TestAccIAMUser_tags_EmptyTag_OnUpdate_Add (89.88s)
=== CONT  TestAccIAMUser_ForceDestroy_signingCertificate
--- PASS: TestAccIAMUser_tags_EmptyTag_OnCreate (70.26s)
=== CONT  TestAccIAMUser_ForceDestroy_policyAttached
--- PASS: TestAccIAMUser_ForceDestroy_policyInlineAttached (32.22s)
=== CONT  TestAccIAMUser_ForceDestroy_sshKey
--- PASS: TestAccIAMUser_tags_DefaultTags_updateToResourceOnly (57.65s)
=== CONT  TestAccIAMUserPolicy_namePrefix
--- PASS: TestAccIAMUserPolicy_multiplePolicies (55.59s)
=== CONT  TestAccIAMUser_tags
--- PASS: TestAccIAMUser_permissionsBoundary (159.11s)
=== CONT  TestAccIAMUserPolicy_policyOrder
--- PASS: TestAccIAMUser_ForceDestroy_policyInline (30.29s)
--- PASS: TestAccIAMUser_ForceDestroy_serviceSpecificCred (38.77s)
--- PASS: TestAccIAMUser_ForceDestroy_policyAttached (31.09s)
--- PASS: TestAccIAMUser_ForceDestroy_signingCertificate (37.92s)
--- PASS: TestAccIAMUser_ForceDestroy_sshKey (36.20s)
--- PASS: TestAccIAMUser_tags_DefaultTags_overlapping (92.32s)
--- PASS: TestAccIAMUserPolicy_namePrefix (32.42s)
--- PASS: TestAccIAMUser_tags_DefaultTags_updateToProviderOnly (52.24s)
--- PASS: TestAccIAMUserPolicy_policyOrder (30.39s)
--- PASS: TestAccIAMUser_tags_DefaultTags_nonOverlapping (76.56s)
--- PASS: TestAccIAMUser_tags_DefaultTags_providerOnly (79.84s)
--- PASS: TestAccIAMUser_tags (66.70s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	257.311s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. service/iam Issues and PRs that pertain to the iam service. labels Mar 28, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 28, 2024
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. sweeper Pertains to changes to or issues with the sweeper. and removed size/M Managed by automation to categorize the size of a PR. labels Mar 28, 2024
@YakDriver YakDriver merged commit 5f2a601 into main Mar 29, 2024
37 checks passed
@YakDriver YakDriver deleted the b-iam-user-force-destroy branch March 29, 2024 00:29
@github-actions github-actions bot added this to the v5.44.0 milestone Mar 29, 2024
github-actions bot pushed a commit that referenced this pull request Mar 29, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

This functionality has been released in v5.44.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!

Copy link

github-actions bot commented May 7, 2024

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/iam Issues and PRs that pertain to the iam service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_iam_user: force_destroy Does Not Detach Policies
1 participant