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

Fix users attribute of iam_group data source #10993

Merged
merged 2 commits into from
Nov 25, 2019
Merged

Fix users attribute of iam_group data source #10993

merged 2 commits into from
Nov 25, 2019

Conversation

ftalburt
Copy link
Contributor

@ftalburt ftalburt commented Nov 23, 2019

Summary

The current implementation of the aws_iam_group data source only retrieves the first 100 users in an IAM group. This PR updates the code to page through the API response and return the full list of users.

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates #7076

Release note for CHANGELOG:

Add ability for aws_iam_group data source to retrieve more than 100 users

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSDataSourceIAMGroup_users'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSDataSourceIAMGroup_users -timeout 120m
=== RUN   TestAccAWSDataSourceIAMGroup_users
=== PAUSE TestAccAWSDataSourceIAMGroup_users
=== CONT  TestAccAWSDataSourceIAMGroup_users
--- PASS: TestAccAWSDataSourceIAMGroup_users (204.28s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       204.341s

@ftalburt ftalburt requested a review from a team November 23, 2019 15:14
@ghost ghost added size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 23, 2019
@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 25, 2019
@bflad bflad added this to the v2.40.0 milestone Nov 25, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this fix, @ftalburt 🚀

Output from acceptance testing:

--- PASS: TestAccAWSDataSourceIAMGroup_basic (10.21s)
--- PASS: TestAccAWSDataSourceIAMGroup_users (291.17s)

@bflad bflad merged commit 16f539d into hashicorp:master Nov 25, 2019
bflad added a commit that referenced this pull request Nov 25, 2019
@ftalburt ftalburt deleted the fix_data-iam-group_users branch November 26, 2019 04:20
@ghost
Copy link

ghost commented Nov 27, 2019

This has been released in version 2.40.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!

@ghost
Copy link

ghost commented Mar 29, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. size/S 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.

4 participants