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

Added new datasource for listing instance profiles for a role #24423

Merged

Conversation

Aegon95
Copy link
Contributor

@Aegon95 Aegon95 commented Apr 26, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #23646

Sample Output for datasource:
image

Output from acceptance testing:

$ make testacc TESTS=TestAccXXX PKG=ec2

...

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. provider Pertains to the provider itself, rather than any interaction with AWS. service/iam Issues and PRs that pertain to the iam service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Apr 26, 2022
@justinretzolk justinretzolk added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 26, 2022
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. and removed size/M Managed by automation to categorize the size of a PR. labels Apr 26, 2022
Copy link
Collaborator

@kamilturek kamilturek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution 👍 Looks cool. I left a few ideas for improvement.

internal/service/iam/instance_profiles_data_source_test.go Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source_test.go Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source.go Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source.go Outdated Show resolved Hide resolved
.changelog/23646.txt Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source.go Outdated Show resolved Hide resolved
@Aegon95
Copy link
Contributor Author

Aegon95 commented May 2, 2022

kamilturek I did all the changes mentioned, have a look and let me know if those are good

for role_name validation i have reused validation function from role resource creation (role.go), not sure if thats okay

Copy link
Collaborator

@kamilturek kamilturek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general 👍 Thanks! 🚀

internal/service/iam/instance_profiles_data_source.go Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source_test.go Outdated Show resolved Hide resolved
internal/service/iam/instance_profiles_data_source_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTS=TestAccIAMInstanceProfilesDataSource_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMInstanceProfilesDataSource_'  -timeout 180m
=== RUN   TestAccIAMInstanceProfilesDataSource_basic
=== PAUSE TestAccIAMInstanceProfilesDataSource_basic
=== CONT  TestAccIAMInstanceProfilesDataSource_basic
--- PASS: TestAccIAMInstanceProfilesDataSource_basic (18.27s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	26.279s

@ewbankkit
Copy link
Contributor

@Aegon95 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit d583f90 into hashicorp:main May 5, 2022
@github-actions github-actions bot added this to the v4.13.0 milestone May 5, 2022
@github-actions
Copy link

github-actions bot commented May 5, 2022

This functionality has been released in v4.13.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!

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

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.
If you have found a problem that seems related to this change, 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 Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/iam Issues and PRs that pertain to the iam service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data source: aws_iam_instance_profiles
4 participants