-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Issue #6072 datasource/aws_iam_policy: lookup by name #6084
Conversation
Hey @saravanan30erd! Thanks for submitting this. 😄 This functionality will be fun to implement as we may need to think about the design a little more. All these below are possible and valid ARNs that we would want to support for lookup via name (the
The answer may be to perform the lookup via |
will look on it. |
@bflad covered all the possible ARNs when using |
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDataSourceIAMPolicy_' |
@bflad anything needed to push this in? |
This PR seems to have fallen through the cracks but I feel would be valuable addition to the provider. Is there any chance for a review @bflad @aeschright ? |
hi @saravanan30erd, thanks again for creating this PR and apologies for not reaching out sooner! before creating another holistic review of the work here, do you mind rebasing to sync up with the changes from master as it's been quite some time? |
8af7aee
to
7964b47
Compare
@anGie44 rebased with master. |
Notification of Recent and Upcoming Changes to ContributionsThank you for this contribution! There have been a few recent development changes that affect this pull request. We apologize for the inconvenience, especially if there have been long review delays up until now. Please note that this is automated message from an unmonitored account. See the FAQ for additional information on the maintainer team and review prioritization. If you are unable to complete these updates, please leave a comment for the community and maintainers so someone can potentially continue the work. The maintainers will encourage other contributors to use the existing contribution as the base for additional changes as appropriate. Otherwise, contributions that do not receive updated code or comments from the original contributor may be closed in the future so the maintainers can focus on active items. For the most up to date information about Terraform AWS Provider development, see the Contributing Guide. Additional technical debt changes can be tracked with the As part of updating a pull request with these changes, the most current unit testing and linting will run. These may report issues that were not previously reported. Action Required: Terraform 0.12 SyntaxReference: #8950 Version 3 and later of the Terraform AWS Provider, which all existing contributions would potentially be added, only supports Terraform 0.12 and later. Certain syntax elements of Terraform 0.11 and earlier show deprecation warnings during runs with Terraform 0.12. Documentation and test configurations, such as those including deprecated string interpolations ( Action Required: Terraform Plugin SDK Version 2Reference: #14551 The Terraform AWS Provider has been upgraded to the latest version of the Terraform Plugin SDK. Generally, most changes to contributions should only involve updating Go import paths in source code files. Please see the referenced issue for additional information. Removal of website/aws.erb FileReference: #14712 Any changes to the Upcoming Change of Git Branch NamingReference: #14292 Development environments will need their upstream Git branch updated from Upcoming Change of GitHub OrganizationReference: #14715 This repository will be migrating from https://github.com/terraform-providers/terraform-provider-aws to https://github.com/hashicorp/terraform-provider-aws. No practitioner or developer action is anticipated and most GitHub functionality will automatically redirect to the new location. Go import paths including |
Hi @saravanan30erd , thank you again for this PR and apologies for the delay! Because it's been quite some time and contribution requirements have changed, I'm going to take the work you have here and bring it up to passing our CI checks in addition to refactoring the policy search method to enable use of the Output from acceptance tests (commerical):
|
cccfaf1
to
c0905ee
Compare
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.
Many thanks @saravanan30erd 🚀 !
Output of acceptance tests:
--- PASS: TestAccAWSDataSourceIAMPolicy_NonExistent (3.02s)
--- PASS: TestAccAWSDataSourceIAMPolicy_NameAndPathPrefix (12.49s)
--- PASS: TestAccAWSDataSourceIAMPolicy_Arn (17.09s)
--- PASS: TestAccAWSDataSourceIAMPolicy_Name (17.15s)
--- PASS: TestPolicySearchDetails (0.00s)
--- PASS: TestPolicySearchDetails/#00 (0.00s)
--- PASS: TestPolicySearchDetails/#01 (0.00s)
--- PASS: TestPolicySearchDetails/tf-acc-test-policy (0.00s)
--- PASS: TestPolicySearchDetails/#02 (0.00s)
--- PASS: TestPolicySearchDetails/tf-acc-test-policy#01 (0.00s)
--- PASS: TestPolicySearchDetails/#03 (0.00s)
--- PASS: TestPolicySearchDetails/tf-acc-test-policy#02 (0.00s)
--- PASS: TestPolicySearchDetails/tf-acc-test-policy#03 (0.00s)
This has been released in version 3.38.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 for triage. Thanks! |
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. |
Fixes #6072
Output from acceptance testing: