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

Add aws_identitystore_group_memberships data source #31589

Merged

Conversation

liath
Copy link
Contributor

@liath liath commented May 26, 2023

Description

Adds a data source for listing the members of an Identity Store Group. Part of a few PRs to cover #26770.

Relations

Relates #26770

References

https://docs.aws.amazon.com/cli/latest/reference/identitystore/list-group-memberships.html
https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_ListGroupMemberships.html

Output from Acceptance Testing

$ make testacc TESTS=TestAccIdentityStoreGroupMembershipsDataSource PKG=identitystore
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/identitystore/... -v -count 1 -parallel 20 -run='TestAccIdentityStoreGroupMembershipsDataSource'  -timeout 360m
=== RUN   TestAccIdentityStoreGroupMembershipsDataSource_basic
=== PAUSE TestAccIdentityStoreGroupMembershipsDataSource_basic
=== CONT  TestAccIdentityStoreGroupMembershipsDataSource_basic
--- PASS: TestAccIdentityStoreGroupMembershipsDataSource_basic (20.24s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/identitystore      31.620s

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. generators Relates to code generators. service/identitystore Issues and PRs that pertain to the identitystore service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels May 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@justinretzolk justinretzolk added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels May 26, 2023
@liath
Copy link
Contributor Author

liath commented May 26, 2023

I went with the arrays of each result attribute style from ssm_parameters_by_path vs one array for each result like they come from the API (ala iam_access_keys). Happy to switch if that wasn't the right call but I didn't see anything in the docs to prefer one over the other. I figured the majority of callers only care about the member_ids field anyways so we might as well make that as easy to consume as possible.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…roup_memberships-data-source

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…per lint

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…roup_memberships-data-source

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…roup_memberships-data-source
@liath
Copy link
Contributor Author

liath commented Apr 23, 2024

Migrated to the plugin framework as @aristosvo has done for #31681 / #36993, hopefully that helps it get merged.

@liath liath requested a review from a team as a code owner March 13, 2025 21:41
jar-b added 3 commits March 18, 2025 10:50
```console
% make testacc PKG=identitystore TESTS=TestAccIdentityStoreGroupMembershipsDataSource_basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/identitystore/... -v -count 1 -parallel 20 -run='TestAccIdentityStoreGroupMembershipsDataSource_basic'  -timeout 360m -vet=off
2025/03/18 10:48:30 Initializing Terraform AWS Provider...

--- PASS: TestAccIdentityStoreGroupMembershipsDataSource_basic (9.15s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/identitystore      15.892s
```
…ttribute spelling
Copy link
Member

@jar-b jar-b 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 PKG=identitystore TESTS=TestAccIdentityStoreGroupMembershipsDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/identitystore/... -v -count 1 -parallel 20 -run='TestAccIdentityStoreGroupMembershipsDataSource_'  -timeout 360m -vet=off
2025/03/18 11:20:38 Initializing Terraform AWS Provider...
=== RUN   TestAccIdentityStoreGroupMembershipsDataSource_basic
=== PAUSE TestAccIdentityStoreGroupMembershipsDataSource_basic
=== CONT  TestAccIdentityStoreGroupMembershipsDataSource_basic
--- PASS: TestAccIdentityStoreGroupMembershipsDataSource_basic (8.91s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/identitystore      15.523s

@jar-b
Copy link
Member

jar-b commented Mar 18, 2025

Thanks for your contribution, @liath 👍. I added handling for the member_id union type and some test checks.

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 🚀.

@jar-b jar-b merged commit db390a6 into hashicorp:main Mar 18, 2025
44 checks passed
Copy link

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.92.0 milestone Mar 18, 2025
@liath liath deleted the f-aws_identitystore_group_memberships-data-source branch March 18, 2025 18:54
@liath
Copy link
Contributor Author

liath commented Mar 18, 2025

Thanks @jar-b and @ewbankkit

As for #31688, I imagine that will need the same changes as this

Copy link

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

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-data-source Introduces a new data source. service/identitystore Issues and PRs that pertain to the identitystore service. size/L 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.

None yet

4 participants