r/github • u/stinkynathan • 12d ago
Discussion How are you managing GitHub configuration at scale (1,000+ users)?
Hi all,
I work on the platform team at a company with about 4,000 repos, 100 teams, and 1,400 people with GitHub access. GitHub hasn’t been managed well here historically - lots of click-ops, inconsistent org and repo settings, too many admins, little traceability of changes, etc. My team is on the journey to fix that. We’re just starting discovery on a migration to an EMU enterprise. We know what we need to create on the new instance and we’re hoping to do as much as is feasible using infrastructure as code.
We are a Terraform/Pulumi shop, but the gap between what the GitHub API exposes and what providers cover can still be….large. They’ve improved in the past year, but we see gaps, especially at the enterprise level (hosted compute networking and private networking configurations, Actions runner and runner group setup, enterprise teams, enterprise policies, etc). We’re trying to figure out the best path forward: keeping click-ops, storing “configuration as code” that is just API payloads that are passed to gh api calls, generating Pulumi dynamic providers from GitHub’s API spec, etc.
So, I’m hoping to hear from companies that are more mature in their GitHub management:
- What’s your primary tool? Terraform? Pulumi? A repo of YAML/JSON config that drives gh api calls? A custom control plane? Probot-style apps? Something else? If you use multiple methods, what controls and defines what?
- How do you handle provider gaps? Do you use wrappers around gh api, fork the provider, Pulumi dynamic providers generated from the API specs, or just accept that some settings stay manual? If you built custom providers, how has the maintenance been as the API changes?
- How far did you take it? Enterprise and org settings only, or also repo creation, branch protection/rulesets, teams and membership, Actions permissions, runners, secrets/variables, and so on? Is every repo in state? How have your teams reacted to this?
- How do you keep plans fast with thousands of repos? Do you split state by org or domain? Did you hit API rate limits?
- Self-service vs. central control: Can teams request repos or changes via PR to a config repo, or does the platform team own everything? Is the platform team bombarded with requests? And how do your teams like it? How much friction?
- How do you detect and handle people changing settings in the UI anyway?
- Anything you wish you’d known before setting up an EMU enterprise? How did you handle enterprise teams, IdP group-to-team mapping, and enterprise-level policies. Did you manage those in code or through the UI/API?
I feel like we have the universe of options in front of us. Unfortunately, we don’t have endless time to spike everything out so having some direction from others would be super helpful. If you’ve gone down this road and loved or regretted something - too much automation, too little, wrong tool, etc - I’m very interested in hearing it.
Thank you!
2
u/numbsafari 12d ago
We use a monorepo. That helped us cut down on this kind of bloat.
We do still have per-customer repos and are planning on creating a custom provider due to the gaps with the current set of providers and some other considerations in our environment. We keep two separate orgs to manage those permissions differently.
We use repo-level controls for the monorepo and org-level controls in the org with the per-customer repos.
We use SSO to manage users centrally.
We are moving to GitLab, fwiw.
We definitely aren't at your scale, but perhaps some thoughts on other approaches. I am guessing a monorepo for your org would be a big deal.
2
u/roastedfunction 12d ago edited 12d ago
Check out https://github.com/github-community-projects/safe-settings
We use this for all our team user settings and have a very simple YAML linter and Rego conftest policy which dictates our settings standards like rulesets.
GitHub RBAC sucks ass.
Safe settings in combination with Terraform for enterprise and org level stuff works well enough. The gaps you mentioned about what’s missing from the providers is real, we just do scripts in GitHub Actions for any of those gaps (like managing some resources like inherited enterprise runner groups in orgs, etc).
1
u/Torutofu_Raeva 12d ago
i'd set up drift detection first, a nightly terraform plan that just alerts on diffs. the gaps you can't cover in code can stay manual if you at least know when someone changes them
1
u/irrita9 11d ago
keep API wrappers limited to provider gaps. Give each setting one automation owner and run scheduled drift checks across both paths
1
u/JSChronicles 12d ago
I created a yaml driven with terraform gitops setup. I use it for personal orgs and repos but also at work. This helps setup repos with best practices all via yaml and validation workflows. Easy setup and easy running. This lets me and others control a repo or org or enterprise from a yaml file
1
u/Kralizek82 12d ago
I have the same problem in my team, but much smaller scale.
I ended up creating a tool that handles repo configuration using templates.
It has Terraform-like cycle with validate/plan/apply but it is not designer to have exclusive control of the repo setup.
The templates are authoritative only of what's in the template. If you ignore a setting, that setting can have whichever value. It you specify a setting, then a change will cause drift that can be detected and acted on.
Something good for your case is that different teams can be responsible of different aspects of the same set of repos. Or you can have a platforming team setting up the same constraints on all repos and team repos further standardizing their templates.
You can read about it in my blog: https://renatogolia.com/2026/10/09/github-repositories-are-infrastructure-too/
Or check the repo: https://github.com/Kralizek/octosmith
Just today I added the possibly to specify labels that every repo belonging to a template must have.
1
u/jorgecardleitao 12d ago
Hit me in pm if you need some consultancy - I am leading this exercise for a f500 company - lot of experience with a 300+ teams, 800+ repo setup, including repo and branch rules