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/aws_iam_user_policy_attachments_exclusive: new resource #39731

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Oct 15, 2024

Description

This resource will allow practitioners to retain exclusive ownership of customer managed policy attachments to IAM users via Terraform.

Relations

Relates #39376
Closes #39380

Output from Acceptance Testing

% make testacc PKG=iam TESTS=TestAccIAMUserPolicyAttachmentsExclusive_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUserPolicyAttachmentsExclusive_'  -timeout 360m
2024/10/15 14:35:20 Initializing Terraform AWS Provider...

--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_empty (14.88s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy (17.33s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_basic (17.45s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_User (17.57s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval (25.10s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition (25.12s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_multiple (25.78s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        30.795s

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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iam Issues and PRs that pertain to the iam service. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 15, 2024
@jar-b jar-b force-pushed the f-user_attachment_exclusive branch from 2f1e42c to f379744 Compare October 15, 2024 19:01
@jar-b jar-b marked this pull request as ready for review October 15, 2024 19:40
@jar-b jar-b requested a review from a team as a code owner October 15, 2024 19:40
@jar-b jar-b added the new-resource Introduces a new resource. label Oct 15, 2024
This resource will allow practitioners to retain exclusive ownership of customer managed policy attachments to IAM users via Terraform.

```console
% make testacc PKG=iam TESTS=TestAccIAMUserPolicyAttachmentsExclusive_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUserPolicyAttachmentsExclusive_'  -timeout 360m
2024/10/15 14:35:20 Initializing Terraform AWS Provider...

--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_empty (14.88s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy (17.33s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_basic (17.45s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_User (17.57s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval (25.10s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition (25.12s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_multiple (25.78s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        30.795s
```
@jar-b jar-b force-pushed the f-user_attachment_exclusive branch from f379744 to 6a6d0be Compare October 15, 2024 19:59
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=TestAccIAMUserPolicyAttachmentsExclusive_' PKG=iam ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/iam/... -v -count 1 -parallel 3  -run=TestAccIAMUserPolicyAttachmentsExclusive_ -timeout 360m
2024/10/16 08:09:33 Initializing Terraform AWS Provider...
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_basic
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_basic
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_disappears_User
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_disappears_User
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_multiple
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_multiple
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_empty
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_empty
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval
=== RUN   TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition
=== PAUSE TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_basic
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_empty
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_empty (10.54s)
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_basic (13.18s)
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandAddition (18.54s)
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_multiple
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_Policy (10.46s)
=== CONT  TestAccIAMUserPolicyAttachmentsExclusive_disappears_User
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_outOfBandRemoval (17.29s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_disappears_User (10.07s)
--- PASS: TestAccIAMUserPolicyAttachmentsExclusive_multiple (19.46s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	43.327s

@jar-b jar-b merged commit 8493020 into main Oct 16, 2024
42 checks passed
@jar-b jar-b deleted the f-user_attachment_exclusive branch October 16, 2024 17:01
@github-actions github-actions bot added this to the v5.73.0 milestone Oct 16, 2024
@johnsonaj johnsonaj modified the milestones: v5.73.0, v5.72.1 Oct 16, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 16, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-resource Introduces a new resource. service/iam Issues and PRs that pertain to the iam service. 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.

[New Resource]: aws_iam_user_policy_attachments_exclusive
3 participants