Skip to content

Scripts used to migrate from manual github management to terraform

Notifications You must be signed in to change notification settings

shmileee/github-to-terraform

 
 

Repository files navigation

github-to-terraform

Description

github-to-terraform is used to retrieve your organization's GitHub configuration and convert it into Terraform code. Currently supported functions:

  • collaborators

Installation

For OSX Homebrew:

brew tap shmileee/homebrew-tap
brew install github-to-terraform

Prerequisites

Set GITHUB_TOKEN environmental variable:

export GITHUB_TOKEN=<gh pat>

Usage

Get current GitHub configuration and create Terraform code for it

Usage:
  github-to-terraform [command]

Available Commands:
  collaborators Retrieve repository collaborators from GitHub and save them as
  Terraform resources
  completion    Generates bash completion scripts
  help          Help about any command
  version       Print the version

Flags:
  -h, --help   help for github-to-terraform

Use "github-to-terraform [command] --help" for more information about a command.

Examples

Extract outside collaborators for all private repositories in organization:

github-to-terraform collaborators --org Appsilon

Extract collaborators from single public repository like this:

github-to-terraform collaborators --repo-type public --repo-name <repository>

About

Scripts used to migrate from manual github management to terraform

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 81.4%
  • Makefile 9.5%
  • Smarty 7.9%
  • Dockerfile 1.2%