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

d/aws_identitystore_group: expose all group attributes #27762

Merged

Conversation

roberth-k
Copy link
Contributor

Description

  • Refactor data source using the aws_identitystore_user resource.
  • Refactor resource using the GetGroupId and DescribeGroup API-s instead of ListGroups.
  • Expose all attributes of the Group data type.
  • Deprecates the filter attribute in favour of the alternate_identifier configuration block in line with GetGroupId.

Relations

Relates #26598
Relates #27053

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccIdentityStoreGroupDataSource_ PKG=identitystore
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/identitystore/... -v -count 1 -parallel 20 -run='TestAccIdentityStoreGroupDataSource_'  -timeout 180m
=== RUN   TestAccIdentityStoreGroupDataSource_filterDisplayName
=== PAUSE TestAccIdentityStoreGroupDataSource_filterDisplayName
=== RUN   TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
=== PAUSE TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
=== RUN   TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
=== PAUSE TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
=== RUN   TestAccIdentityStoreGroupDataSource_nonExistent
=== PAUSE TestAccIdentityStoreGroupDataSource_nonExistent
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
=== RUN   TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
=== PAUSE TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
=== CONT  TestAccIdentityStoreGroupDataSource_filterDisplayName
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
=== CONT  TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
=== CONT  TestAccIdentityStoreGroupDataSource_nonExistent
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
=== CONT  TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
=== CONT  TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
=== CONT  TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
=== CONT  TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
--- PASS: TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute (2.38s)
--- PASS: TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId (2.44s)
--- PASS: TestAccIdentityStoreGroupDataSource_nonExistent (3.08s)
--- PASS: TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute (8.48s)
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId (8.50s)
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch (8.50s)
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute (8.50s)
--- PASS: TestAccIdentityStoreGroupDataSource_filterDisplayName (12.66s)
--- PASS: TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId (12.92s)
--- PASS: TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName (13.08s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/identitystore      14.925s

@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 size/XL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/identitystore Issues and PRs that pertain to the identitystore service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 11, 2022
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 11, 2022
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=TestAccIdentityStoreGroupDataSource_' PKG=identitystore ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/identitystore/... -v -count 1 -parallel 2  -run=TestAccIdentityStoreGroupDataSource_ -timeout 180m
=== RUN   TestAccIdentityStoreGroupDataSource_filterDisplayName
=== PAUSE TestAccIdentityStoreGroupDataSource_filterDisplayName
=== RUN   TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
=== PAUSE TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
=== RUN   TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
=== PAUSE TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
=== RUN   TestAccIdentityStoreGroupDataSource_nonExistent
=== PAUSE TestAccIdentityStoreGroupDataSource_nonExistent
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
=== RUN   TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
=== PAUSE TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
=== RUN   TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
=== PAUSE TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
=== CONT  TestAccIdentityStoreGroupDataSource_filterDisplayName
=== CONT  TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute
--- PASS: TestAccIdentityStoreGroupDataSource_externalIdConflictsWithUniqueAttribute (3.75s)
=== CONT  TestAccIdentityStoreGroupDataSource_nonExistent
--- PASS: TestAccIdentityStoreGroupDataSource_nonExistent (4.47s)
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdFilterMismatch (12.97s)
=== CONT  TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId
--- PASS: TestAccIdentityStoreGroupDataSource_filterDisplayName (25.81s)
=== CONT  TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName
--- PASS: TestAccIdentityStoreGroupDataSource_filterDisplayNameAndGroupId (23.92s)
=== CONT  TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId
--- PASS: TestAccIdentityStoreGroupDataSource_filterConflictsWithExternalId (2.08s)
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId
--- PASS: TestAccIdentityStoreGroupDataSource_uniqueAttributeDisplayName (24.85s)
=== CONT  TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdConflictsWithExternalId (12.86s)
=== CONT  TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute
--- PASS: TestAccIdentityStoreGroupDataSource_groupIdConflictsWithUniqueAttribute (12.81s)
--- PASS: TestAccIdentityStoreGroupDataSource_filterConflictsWithUniqueAttribute (12.50s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/identitystore	84.505s

@ewbankkit
Copy link
Contributor

@roberth-k Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit aa5f1b8 into hashicorp:main Nov 11, 2022
@github-actions github-actions bot added this to the v4.40.0 milestone Nov 11, 2022
@github-actions
Copy link

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

@github-actions
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 Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/identitystore Issues and PRs that pertain to the identitystore service. size/XL 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.

2 participants