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

iam_access_group data source can't see more than 50 access groups #3728

Closed
triceam opened this issue Apr 19, 2022 · 0 comments · Fixed by #3744
Closed

iam_access_group data source can't see more than 50 access groups #3728

triceam opened this issue Apr 19, 2022 · 0 comments · Fixed by #3744
Labels
service/IAM Issues related to IAM

Comments

@triceam
Copy link

triceam commented Apr 19, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Terraform v1.1.5
on linux_amd64

Affected Resource(s)

  • iam_access_group data source

Expected Behavior

The iam_access_group data source should be able to see all resource groups that exist within an account.

Actual Behavior

The iam_access_group can't see more than the first 50 access groups within an account. I suspect that the terrafor provider is not using paged results of the IAM API, and is only looking at the first page with a limit of 50. If your account has more than 50 access groups, only those that fall within the first page are recognized by the data source.

You get a runtime error like this:

╷
│ Error: [ERROR] No Access Groups with name ZOS_DEV_VIEW in Account
│ 
│   with module.ibm-access-group.data.ibm_iam_access_group.viewers,
│   on .terraform/modules/ibm-access-group/main.tf line 71, in data "ibm_iam_access_group" "viewers":
│   71: data ibm_iam_access_group viewers {
│ 

Even though the access group does, in fact, exist within the account:
image

Steps to Reproduce

  1. Have an account with more than 50 access groups
  2. Try to read an access group that isn't within the first 50:
data "ibm_iam_access_group" "accgroup" {
  access_group_name = ZOS_DEV_VIEW
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/IAM Issues related to IAM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant