integrations / integrations/terraform-provider-github

[FEAT]: Support filter parameter on github_organization_team_sync_groups data source

Open
#1,809 8 comments 8 reactions 0 assignees View on GitHub
d/organization_team_sync_groups size/S Type: Feature
Dominant language
Go
Stars
1.2k
Forks
1k
Avg merge
1d 14h
Merged PRs (30d)
8

Description

### Describe the need

Currently, the `github_organization_team_sync_groups` data source fetches all groups (in fixed page sizes of 100). This causes performance issues if a large number of groups are synced into GitHub (we have about 3000 groups being pushed to GitHub, so the refresh of `github_organization_team_sync_groups` takes 20+ seconds).

As a feature request, please expose [the `q` query parameter](https://docs.github.com/en/enterprise-cloud@latest/rest/teams/team-sync?apiVersion=2022-11-28#list-idp-groups-for-an-organization), to allow the data source to be scoped to a subset of all groups:

> Filters the results to return only those that begin with the value specified by this parameter. For example, a value of ab will return results that begin with "ab".

For example,

```terraform
data "github_organization_team_sync_groups" "filtered" {
q = "myprefix_"
}
```

### SDK Version

_No response_

### API Version

REST API 2022-11-28 (Enterprise Cloud)

### Relevant log output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.