integrations / integrations/terraform-provider-github
[FEAT]: Add data source support for the External Groups of a Team
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
Currently `github_external_groups` is available, but it lists all external groups for the entire organization. It uses the v3 REST API for [/orgs/{org}/external-groups](https://docs.github.com/en/enterprise-cloud@latest/rest/teams/external-groups?apiVersion=2026-03-10#list-external-groups-available-to-an-organization), via the go-github `TeamService.ListExternalGroups()`.
I have a need to lookup the external groups for a single team, rather than the entire organization. This is exposed via the v3 REST API at [/orgs/{org}/teams/{team_slug}/external-groups](https://docs.github.com/en/enterprise-cloud@latest/rest/teams/external-groups?apiVersion=2026-03-10#list-a-connection-between-an-external-group-and-a-team), and in go-github via `TeamService.ListExternalGroupsForTeamBySlug()`.
Perhaps the best interface would be something like:
```
data "github_team_external_groups" "example" {
slug = "example"
}
```
where the output attributes match the same schema as `data "github_external_groups"`.
### SDK Version
_No response_
### API Version
_No response_
### Relevant log output
```shell
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.