github-to-terraform
is used to retrieve your organization's GitHub
configuration and convert it into Terraform code. Currently supported functions:
- collaborators
For OSX Homebrew:
brew tap shmileee/homebrew-tap
brew install github-to-terraform
Set GITHUB_TOKEN
environmental variable:
export GITHUB_TOKEN=<gh pat>
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.
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>