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

r/iam: fix refreshing permission_boundary state on users and roles #33963

Conversation

lqc
Copy link
Contributor

@lqc lqc commented Oct 17, 2023

Relations

Closes #16534

Output from Acceptance Testing

14:21 $ make testacc PKG=iam TESTS="TestAccIAMRole_permissionsBoundary"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRole_permissionsBoundary'  -timeout 360m
=== RUN   TestAccIAMRole_permissionsBoundary
=== PAUSE TestAccIAMRole_permissionsBoundary
=== CONT  TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_permissionsBoundary (146.16s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	149.564s
14:32 $ make testacc PKG=iam TESTS="TestAccIAMUser_permissionsBoundary"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUser_permissionsBoundary'  -timeout 360m
=== RUN   TestAccIAMUser_permissionsBoundary
=== PAUSE TestAccIAMUser_permissionsBoundary
=== CONT  TestAccIAMUser_permissionsBoundary
--- PASS: TestAccIAMUser_permissionsBoundary (145.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	148.474s
...

@github-actions
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 the size/S Managed by automation to categorize the size of a PR. label Oct 17, 2023
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iam Issues and PRs that pertain to the iam service. labels Oct 17, 2023
@github-actions
Copy link

Hey @lqc 👋 Thank you very much for your contribution! At times, our maintainers need to make direct edits to pull requests in order to help get it ready to be merged. Your current settings do not allow maintainers to make such edits. To help facilitate this, update your pull request to allow such edits as described in GitHub's Allowing changes to a pull request branch created from a fork documentation. (If you're using a fork owned by an organization, your organization may not allow you to change this setting. If that is the case, let us know.)

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 17, 2023
@lqc lqc force-pushed the b-iam-permissions-boundary-drift-detection branch from af3da61 to e27af0d Compare October 17, 2023 12:39
@lqc
Copy link
Contributor Author

lqc commented Oct 17, 2023

PR is made from an org account and it seems enabling "allow maintainers to make edits" still doesn't work on GH. Hope this isn't a huge problem.

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 18, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a 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_\|TestAccIAMUser_' PKG=iam ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 2  -run=TestAccIAMRole_\|TestAccIAMUser_ -timeout 360m
=== 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_tags
=== PAUSE TestAccIAMRole_tags
=== 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_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
=== 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_nameChange
=== PAUSE TestAccIAMUser_nameChange
=== RUN   TestAccIAMUser_pathChange
=== PAUSE TestAccIAMUser_pathChange
=== RUN   TestAccIAMUser_permissionsBoundary
=== PAUSE TestAccIAMUser_permissionsBoundary
=== RUN   TestAccIAMUser_tags
=== PAUSE TestAccIAMUser_tags
=== CONT  TestAccIAMRole_basic
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_basic (24.02s)
=== CONT  TestAccIAMUser_ForceDestroy_loginProfile
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (38.32s)
=== CONT  TestAccIAMUser_tags
--- PASS: TestAccIAMUser_ForceDestroy_loginProfile (22.70s)
=== CONT  TestAccIAMUser_permissionsBoundary
--- PASS: TestAccIAMUser_tags (38.66s)
=== CONT  TestAccIAMUser_pathChange
--- PASS: TestAccIAMUser_pathChange (38.58s)
=== CONT  TestAccIAMUser_nameChange
--- PASS: TestAccIAMUser_permissionsBoundary (105.31s)
=== CONT  TestAccIAMUser_ForceDestroy_signingCertificate
--- PASS: TestAccIAMUser_nameChange (38.22s)
=== CONT  TestAccIAMUser_ForceDestroy_serviceSpecificCred
--- PASS: TestAccIAMUser_ForceDestroy_signingCertificate (22.64s)
=== CONT  TestAccIAMUser_ForceDestroy_sshKey
--- PASS: TestAccIAMUser_ForceDestroy_serviceSpecificCred (22.69s)
=== CONT  TestAccIAMUser_ForceDestroy_mfaDevice
--- PASS: TestAccIAMUser_ForceDestroy_sshKey (23.72s)
=== CONT  TestAccIAMRole_maxSessionDuration
--- PASS: TestAccIAMUser_ForceDestroy_mfaDevice (24.26s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (40.48s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_maxSessionDuration (49.06s)
=== CONT  TestAccIAMRole_ManagedPolicy_basic
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (39.73s)
=== CONT  TestAccIAMRole_InlinePolicy_empty
--- PASS: TestAccIAMRole_InlinePolicy_empty (20.20s)
=== CONT  TestAccIAMRole_InlinePolicy_ignoreOrder
--- PASS: TestAccIAMRole_ManagedPolicy_basic (59.43s)
=== CONT  TestAccIAMRole_InlinePolicy_basic
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (52.35s)
=== CONT  TestAccIAMRole_tags
--- PASS: TestAccIAMRole_InlinePolicy_basic (55.42s)
=== CONT  TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_tags (38.37s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (35.51s)
=== CONT  TestAccIAMUser_ForceDestroy_accessKey
--- PASS: TestAccIAMUser_ForceDestroy_accessKey (23.03s)
=== CONT  TestAccIAMUser_disappears
--- PASS: TestAccIAMRole_permissionsBoundary (102.63s)
=== CONT  TestAccIAMUser_basic
--- PASS: TestAccIAMUser_disappears (17.51s)
=== CONT  TestAccIAMRole_diffs
--- PASS: TestAccIAMUser_basic (38.55s)
=== CONT  TestAccIAMRole_policiesForceDetach
--- PASS: TestAccIAMRole_policiesForceDetach (24.79s)
=== CONT  TestAccIAMRole_disappears
--- PASS: TestAccIAMRole_disappears (19.28s)
=== CONT  TestAccIAMRole_badJSON
--- PASS: TestAccIAMRole_badJSON (3.14s)
=== CONT  TestAccIAMRole_diffsCondition
--- PASS: TestAccIAMRole_diffsCondition (100.38s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (48.05s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (45.24s)
=== CONT  TestAccIAMRole_namePrefix
--- PASS: TestAccIAMRole_namePrefix (23.59s)
=== CONT  TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_testNameChange (40.86s)
=== CONT  TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMRole_diffs (348.68s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_nameGenerated (23.64s)
=== CONT  TestAccIAMRole_description
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (50.49s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_description (56.67s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (35.14s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	907.420s

@ewbankkit
Copy link
Contributor

@lqc Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit e7e300f into hashicorp:main Oct 18, 2023
44 checks passed
@github-actions github-actions bot added this to the v5.22.0 milestone Oct 18, 2023
@lqc lqc deleted the b-iam-permissions-boundary-drift-detection branch October 18, 2023 16:26
@lqc
Copy link
Contributor Author

lqc commented Oct 18, 2023

@ewbankkit Thank you for a quick review.

@github-actions
Copy link

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

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 Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. size/S Managed by automation to categorize the size of a PR. 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.

aws_iam_user does not detect changes to permissions_boundary
2 participants