← Back
GitHub org automation (Terraform)
Terraform configuration that manages a homelab GitHub org: repositories, teams, membership, permissions, and optional branch protection.
TerraformGitHubIaCAccess Control
Visit project 
Highlights
- •Repos + access control managed declaratively
- •Team membership and permissions kept consistent across repos
- •Optional branch protection via a single feature flag
This repo manages GitHub organisation resources using Terraform. It defines repositories, teams, team membership, and permissions so the baseline structure of the org stays consistent as the homelab evolves.
What it demonstrates
- Treating GitHub org structure as infrastructure (repos, teams, permissions)
- Simple input surface via Terraform variables
- Optional branch protection as a controlled toggle
Core components
- Repository definitions: create and configure the org repos
- Teams and membership: a small, explicit access model (admins team)
- Access bindings: team-to-repo permissions kept consistent
- Branch protection: enabled only when the feature flag is set
Operational workflow
The workflow is intentionally minimal: initialise, plan, and apply with a GitHub token provided via environment variable. Outputs expose clone URLs for downstream use.
- terraform init
- terraform plan/apply with github_owner and optional org_admins
- state stored locally (homelab assumption)