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

Missing pagination support for data source google_service_accounts #20920

Open
bestefreund opened this issue Jan 15, 2025 · 0 comments · May be fixed by GoogleCloudPlatform/magic-modules#12763
Labels
bug forward/review In review; remove label to forward service/iam-serviceaccount

Comments

@bestefreund
Copy link

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 me too comments, 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.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.10.4
on x64

  • provider registry.terraform.io/hashicorp/google v6.16.0

Affected Resource(s)

google_service_accounts data source

Terraform Configuration

locals {
  # Project for test deployment
  project_id = "example-project"

  # Create a list with 30 elements used for deploying service accounts
  service_accounts = [
    for i in range(30) :
    "example-${format("%02d", i + 1)}-test"
  ]
}

# Deploy service accounts
resource "google_service_account" "test" {
  for_each = toset(local.service_accounts)

  account_id = each.value
  project    = local.project_id
}

# Query service accounts
data "google_service_accounts" "test" {
  project = local.project_id

  depends_on = [
    google_service_account.test,
  ]
}

Debug Output

No response

Expected Behavior

If more than 20 service accounts exist in a project, all service accounts should be covered

Actual Behavior

If more than 20 service accounts exist in a project, only 20 are covered

Steps to reproduce

terraform init
terraform plan -out=out.plan
terraform apply out.plan
echo "length(data.google_service_accounts.test.accounts)" | terraform console

The result is 20 but should be at least 30, if the example from the Terraform configuration is used.

Important Factoids

No response

References

No response

@github-actions github-actions bot added forward/review In review; remove label to forward service/iam-serviceaccount labels Jan 15, 2025
@bestefreund bestefreund changed the title Missing pagination support for data_google_service_accounts Missing pagination support for data source google_service_accounts Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forward/review In review; remove label to forward service/iam-serviceaccount
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant