d/aws_iam_role_policies: new data source#46936
Open
Eiji-Kudo wants to merge 3 commits intohashicorp:mainfrom
Open
d/aws_iam_role_policies: new data source#46936Eiji-Kudo wants to merge 3 commits intohashicorp:mainfrom
Eiji-Kudo wants to merge 3 commits intohashicorp:mainfrom
Conversation
Add data source to list inline policy names for an IAM role using the ListRolePolicies API. Closes hashicorp#46579
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
Contributor
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
- Migrate from SDK V2 to Framework (FrameworkDataSource) - Reuse findRolePoliciesByName from role_policies_exclusive.go - Change policy_names from List to Set for consistency - Add role_name validators (length, regex) - Add DONOTCOPY comment - Add twoPolicies test case
0af05b3 to
9eed027
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community Note
Description
Adds a new data source
aws_iam_role_policiesthat lists the names of inline policies embedded in a specified IAM role using the ListRolePolicies API.This is part of the request in #46579. The other two data sources (
aws_iam_attached_role_policiesandaws_iam_custom_policy_simulation) will be submitted as separate PRs.PR Checklist
website/docs/d/iam_role_policies.html.markdown)service_package_gen.goupdated)New Data Source
aws_iam_role_policiesExample Usage
Arguments
role_name(Required) - Name of the IAM role.Attributes
policy_names- List of inline policy names associated with the role.Testing
New acceptance tests:
TestAccIAMRolePoliciesDataSource_basicTestAccIAMRolePoliciesDataSource_emptyPartially addresses #46579