26 September 2024 ~ 2 min read
Managing GitHub with Terraform (and GitHub) - now live!

Benjamin Clark
Part 3 of 4 in Infrastructure as Code (IaC)
Introduction

A while back I wrote a post about about to manage GitHub with Terraform and GitHub, you can read it here.
Well, after a bit of tidying up, I think I’m finally ready to release the source code to the general public.
It’s alive
So, here you go: https://github.com/sudoblark/sudoblark.terraform.github.
You can see the nitty gritty of how I manage GitHub for Sudoblark, including how I:
-
Create new repositories using a simple to read and understand data structure.
-
Split domains of interest to allow logically grouping of repositories.
-
Auto-provision repos with licenses.
-
Auto-provision repos with
codeowners
files. -
Bootstrap repos with a base-level
README.md
that developers (i.e. me) are expected to populate on their first pull request. -
Bootstrap a
commit-to-pr.yaml
GitHub workflow for Terraform repositories - whilst maintaining flexibility to do so for other repo types. -
Centrally manage a single
.gitignore
file for all repositories. -
Centrally manage
pre-commit-config.yaml
for multiple repo types. -
Centrally manage
pull_request_template.md
for multiple repo types.
That’s it, that’s all. A fairly small post today, but I’m working on a fun release in the coming months of my own CLI application so stay tuned.
Part 3 of 4 in Infrastructure as Code (IaC)