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

New Datasources: aws_identitystore_users & aws_identitystore_groups (plural) #26770

Closed
awoimbee opened this issue Sep 12, 2022 · 4 comments · Fixed by #36993
Closed

New Datasources: aws_identitystore_users & aws_identitystore_groups (plural) #26770

awoimbee opened this issue Sep 12, 2022 · 4 comments · Fixed by #36993
Labels
new-data-source Introduces a new data source. service/identitystore Issues and PRs that pertain to the identitystore service.
Milestone

Comments

@awoimbee
Copy link

awoimbee commented Sep 12, 2022

Fixes #17279

I'd appreciate both singular and plural data sources (e.g. aws_identitystore_group and aws_identitystore_groups), [...].

Originally posted by @lorengordon in #17279 (comment)

aws_identitystore_group & aws_identitystore_user were made to fetch a single user or group. It would be nice to have the same resources but plural. These would return a list (with 0, 1 or many elements).

Current workaround:

locals {
  aws_sso_users = {
    # aws identitystore list-users --identity-store-id d-xxxxxxxxxx --query 'Users[].[UserName,UserId]' --output text | awk '{print "\""$1"\" = \""$2"\","}'
    "toto@example.com"           = "1234567891-90825474-0913-xxxx-wwww-abdc5783ff98",
    "jojo@example.com"           = "1234567891-42349857-7836-yyyy-zzzz-192837465302",
    # ...
  }
}

Proposed solution:

data "aws_identitystore_users" "every_user" {
  identity_store_id = tolist(data.aws_ssoadmin_instances.example.identity_store_ids)[0]
}
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 12, 2022
@awoimbee awoimbee changed the title Create datasources aws_identitystore_users & aws_identitystore_groups that return lists New Datasources: aws_identitystore_users & aws_identitystore_groups (plural) Sep 12, 2022
@justinretzolk justinretzolk added new-data-source Introduces a new data source. service/identitystore Issues and PRs that pertain to the identitystore service. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 13, 2022
@JanKoppe
Copy link

AWS has recently released new functionality for the Identity Store API, solving many painpoints. This, and much more should now be possible, previously it just was not.

https://aws.amazon.com/blogs/security/announcing-new-aws-iam-identity-center-apis-to-manage-users-and-groups-at-scale/

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. 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.47.0 milestone Apr 19, 2024
Copy link

This functionality has been released in v5.47.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 issue 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 similar to this, 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 May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source. service/identitystore Issues and PRs that pertain to the identitystore service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants