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

Data source github_team retrieves 30 members max #701

Closed
adebasi opened this issue Feb 12, 2021 · 2 comments
Closed

Data source github_team retrieves 30 members max #701

adebasi opened this issue Feb 12, 2021 · 2 comments
Labels
d/team Type: Bug Something isn't working as documented

Comments

@adebasi
Copy link
Contributor

adebasi commented Feb 12, 2021

Terraform Version

v0.14.6

Affected Resource(s)

Data source:

  • github_team

Terraform Configuration Files

# Simple config to reproduce issue

terraform {
  required_providers {
    github = {
      source = "integrations/github"
      version = "4.4.0"
    }
  }
}

provider "github" {
  owner = "<owner>"
  token = "<token>"
}

data "github_team" "my-team" {
  slug = "<team-with-more-than-30-members>"
}

# Dummy resource to use the members
resource "github_team" "new_team" {
  for_each = toset(data.github_team.my-team.members)
  name        = "foobar-${each.value}"
  description = "Some cool team"
  privacy     = "closed"
}

Expected Behavior

Get all GitHub team members

Actual Behavior

I get a maximum of 30 team members

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform plan
  3. You can see that only 30 resources would get created

References

@majormoses
Copy link
Contributor

majormoses commented Feb 13, 2021

Bumping up the number is fine but we need to also pagination (can be separate pull request). I am not using this pattern but I have teams with well over 100 members.

@adebasi
Copy link
Contributor Author

adebasi commented Feb 14, 2021

@majormoses, I agree. I adapted to PR to use pagination. Please have another look

@adebasi adebasi changed the title Data source github_team retrieve 30 members max Data source github_team retrieves 30 members max Feb 14, 2021
@jcudit jcudit added d/team Type: Bug Something isn't working as documented labels Feb 26, 2021
@adebasi adebasi closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d/team Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

3 participants