/terraform-github-modules

Terraform module which creates GitHub resources on GitHub.

Primary LanguageHCLMIT LicenseMIT

terraform-github-modules

Terraform module that creates GitHub resources on GitHub.

Why use this module?

If you are currently struggling with a growing GitHub organization, or simply want to standardize how you manage GitHub, then these modules are for you. I've created this module to help me deal with how our teams create GitHub repositories across our organization. Here are a few use cases that this repo solved:

  1. Standard label for all repositories.
  2. Versioning of repository creation.
  3. Management of teams and their access permissions in each repository.
  4. Creating repositories from a template repository. Imagine if you want to spin up a repo with all code for your services, CI, and many other things in just a few minutes.

We had many other small things that I incorporated in this module. I hope you like it!

Usage

Simple repo creation:

module "my-simple-repo" {
  source  = "terraform-github-modules//modules/repo"
  version = "~> 1.0"

  name       = "my-private-repo"
  visibility = "private"
}

Organization Secrets:

module "my_org" {
  source  = "terraform-github-modules//modules/org"
  version = "~> 1.0"

  secrets = [
    {
      name            = "MY_COOL_ORG_SECRET"
      plaintext_value = var.ny_org_secret
      visibility      = "private"
      repositories    = []
    }
  ]
}

Examples

  • repo - Manages GitHub repositories.
  • org - Manages GitHub organization.

License

MIT Licensed. See LICENSE for full details.