-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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_users data source #31688
Add aws_identitystore_users data source #31688
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Can this be merged? |
I would like that very much, if you have an in at Hashicorp or are paying them or some consultant they actually listen to you should ask them to prioritize it. These days Hashicorp doesn't seem to care much for PRs unless some paying customer is demanding it and then 99.99999% most likely outcome is some Hashicorp employee will submit and insta-merge their bit perfect copy of this PR and close this one as outdated. ¯_(ツ)_/¯ |
Hey @liath 👋 Thank you for this and your other contributions. I spoke with a colleague of mine that you'd also spoken with, and wanted to touch base with you here as a follow up (I'm the community manager for the AWS Provider specifically). I can totally see where you're coming from in your last comment, and how you could come to that conclusion. This repository receives between 250 and 400 pull requests every month, around half of which are from the community, so prioritization is something we have to think about a lot. That's why I wrote our prioritization guide as one of my first changes when taking my current role -- having no clear picture of when your pull request is going to be reviewed isn't awesome. This particular data source doesn't seem to be as sought after as something like, for instance, the new S3 features announced at re:Invent that the provider had day 1 support for, or additions to more 'core' resources that get more 👍 reactions, and so have gotten prioritized before this pull request. That said, I'm going to start looking at how we can factor age into prioritization as well, to see if we can help prevent experiences like this. |
Migrated to the plugin framework as @aristosvo has done for #31681 / #36993, hopefully that helps it get merged. |
It seems odd that #36993 was merged months ago and this is still open. |
@nevstokes Big agree but here we are. If it's helpful, I use something like the following as a workaround: data "external" "users" {
program = [ "${path.module}/fetch-users.sh" ]
query = { identity_store_id = tolist(data.aws_ssoadmin_instances.default.identity_store_ids)[0] }
} and eval "$(jq -r '@sh "IDENTITY_STORE_ID=\(.identity_store_id)"')"
aws identitystore list-users --identity-store-id "$IDENTITY_STORE_ID" \
--query '{ names: Users[].UserName | join(`,`, @), ids: Users[].UserId | join(`,`, @) }' |
Hi @liath 👋, What I would do if I were you, is to create a new issue and write the exact use-case you are chasing that is supported by these resources and connect it to the PRs. Prior issue for all data resources is closed with the merged PR, and didn't contain that level of detail in the first place. The difference between the merged PR and this one is (besides contributing more regularly) the description of usage. As written down in prior communication on this issue, it is important for the HC maintainers that new resources are supporting healthy use-cases and not edgy one-off patterns (not saying that this one is!). |
I just created an issue #39859 requesting this data source and explaining my use case. I'd love to see this merged so I'm not relying on installing JQ and AWSCLI. |
Anything I can do to help move this along? |
```console % make testacc PKG=identitystore TESTS=TestAccIdentityStoreUsersDataSource_ 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='TestAccIdentityStoreUsersDataSource_' -timeout 360m -vet=off 2025/03/18 15:55:57 Initializing Terraform AWS Provider... --- PASS: TestAccIdentityStoreUsersDataSource_basic (9.06s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/identitystore 15.763s ```
```console % make testacc PKG=identitystore TESTS=TestAccIdentityStoreUsersDataSource_ 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='TestAccIdentityStoreUsersDataSource_' -timeout 360m -vet=off 2025/03/18 16:06:51 Initializing Terraform AWS Provider... --- PASS: TestAccIdentityStoreUsersDataSource_basic (8.87s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/identitystore 15.447s ```
There was a problem hiding this 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=TestAccIdentityStoreUsersDataSource_
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='TestAccIdentityStoreUsersDataSource_' -timeout 360m -vet=off
2025/03/18 16:28:09 Initializing Terraform AWS Provider...
=== RUN TestAccIdentityStoreUsersDataSource_basic
=== PAUSE TestAccIdentityStoreUsersDataSource_basic
=== CONT TestAccIdentityStoreUsersDataSource_basic
--- PASS: TestAccIdentityStoreUsersDataSource_basic (9.05s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/identitystore 15.782s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Thanks for your contribution, @liath! 👍 |
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. |
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! |
Description
Adds a data source for listing all users in an Identity Store instance. Part of a few PRs to cover #26770.
Same as #31681, I'm unsure of the test on this and would appreciate feedback.
Relations
Relates #26770
Closes #39859
References
https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_ListUsers.html
Wrt to server-side filtering being deprecated in the SDK:
https://github.com/aws/aws-sdk-go-v2/blob/service/identitystore/v1.16.11/service/identitystore/api_op_ListUsers.go#L46
Output from Acceptance Testing