Manage GitHub with Terraform
Josh Pollara
On this page
Introduction
Managing a GitHub organization for any sized company can be complicated. This is especially true when you have many teams and projects. Leveraging Terraform and its GitHub provider can make management of a GitHub organization a breeze.
Provider Setup and Authentication
In order to start using the Terraform GitHub provider, you need to first set up the required provider and configure authentication. There are multiple ways to authenticate against GitHub. We’ll cover authentication with a Personal Access Token in this tutorial.
Required provider
Personal Access Token
Create a new Personal Access Token. Make sure to configure your desired scopes.
Provider Configuration
Repository
Create a new repository
Teams
Create a new team
Members
Add members to your new team
Repository
Grant your team access to your repository
Apply
Apply your new changes against your GitHub organization
That’s it
This is a very basic example of how to manage your GitHub organization with Terraform.
Give Terrateam a try for free to manage your IaC lifecycle.