-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 Data Source: aws_ssoadmin_permission_sets #38741
New Data Source: aws_ssoadmin_permission_sets #38741
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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 TESTARGS='-run=TestAccSSOAdminPermissionSetsDataSource_' PKG=ssoadmin
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/ssoadmin/... -v -count 1 -parallel 20 -run=TestAccSSOAdminPermissionSetsDataSource_ -timeout 360m
=== RUN TestAccSSOAdminPermissionSetsDataSource_basic
=== PAUSE TestAccSSOAdminPermissionSetsDataSource_basic
=== CONT TestAccSSOAdminPermissionSetsDataSource_basic
--- PASS: TestAccSSOAdminPermissionSetsDataSource_basic (11.44s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ssoadmin 16.413s
@gramsa49 Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.63.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! |
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. |
Description
New Data Source: aws_ssoadmin_permission_sets
Relations
Internal Feature Request ID: IPL-7043
References
The new data source, aws_ssoadmin_permission_sets, is intended to address a shortcoming with the existing data source, aws_ssoadmin_permission_set, where lookups by name result in 1 sso:ListPermissionSets and N sso:DescribePermissionSets (1 for each provisioned Permission Set).
This is problematic if you need to lookup a series of permission sets by name.
Assume 1000 permission sets are provisioned and you need to lookup 10 by name:
This can be used to retrieve a list of ARNs of all permission sets, then the existing data source, aws_ssoadmin_permission_set, can be used to lookup the permission sets by ARN, which only issues a single sso:DescribePermissionSet call.
Using the same example above with the new data source:
Assume 1000 permission sets are provisioned and you need to lookup 10 by name:
The data returned using this method can be converted to a map indexed by name as follows:
Output from Acceptance Testing