integrations / integrations/terraform-provider-github
[FEAT]: Support turning organization members into outside collaborators
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
I'm a maintainer of tooling for [managing GitHub configuration as code](https://github.com/ipdxco/github-as-code). One of the use cases I'd like to support is the ability to turn existing organisation members into [outside collaborators](https://docs.github.com/en/rest/orgs/outside-collaborators?apiVersion=2026-03-10). This is especially important for organisations on non-free plans, as they often want to free up organisation membership seats without removing access to public repositories for their collaborators.
Currently, when destroying [github_membership](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership), one has to choose between deleting the membership or downgrading it to `member` (if said membership is higher).
I'd like to propose adding a new option for controlling what a membership can be downgraded to, with a choice between `member` and `outside_collaborator`. I have started working on this already and, hopefully, will be able to put it up for review shortly.
### GitHub Installation Type
- [x] GitHub.com (Free, Pro, or Team)
- [ ] GitHub Enterprise Server (on-premises)
- [ ] GitHub Enterprise Cloud with Personal Accounts (github.com)
- [ ] GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- [ ] GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- [ ] I don't know
### Relevant log output
```shell
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Use the github_membership resource as the entry point; first inspect how destroying a membership currently deletes it or downgrades it to member, then review the linked GitHub outside-collaborators API documentation. Done means the downgrade option accepts member or outside_collaborator, applies the selected behavior, preserves public-repository access, and has coverage for both choices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, go, terraform
- Domain
- authorization, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100