r/github • • 24d 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:

  1. 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?
  2. 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?
  3. 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?
  4. How do you keep plans fast with thousands of repos? Do you split state by org or domain? Did you hit API rate limits?
  5. 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?
  6. How do you detect and handle people changing settings in the UI anyway?
  7. 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!

13 Upvotes

14 comments sorted by

View all comments

2

u/roastedfunction 24d ago edited 24d 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).

2

u/stinkynathan 24d ago

Yeah, the RBAC sucks for real. There are a couple policy-as-code solutions (safe-settings included) that we've been looking at implementing due to compliance requirements. In our case teams need some ability to make admin-level changes in their repos, but there are also some non-negotiable settings that a repo admin role gives them that cannot be changed.

The best ideas we've come up with so far are things like:

  • Standing up a control plane that would expose APIs for common tasks. I'm not even sure that is feasible to do.
  • IAC combined with policy-as-code apps like safe-settings to allow teams to control what they need.

Seems like #2 is probably the best path of these options, as you had mentioned.