Skip to content

StratusGrid/terraform-github-repository-creation

Repository files navigation

Contact Us | Stratusphere FinOps | StratusGrid Home | Blog

terraform-github-repository-creation

GitHub: StratusGrid/terraform-github-repository-creation

This module creates GitHub repositories with pre-configured workflow standards. It can use repository templates to provision a repository.

Example

module "terraform-github-repository-creation" {
 source   = "github.com/StratusGrid/terraform-github-repository-creation"

 github_owner = "StratusGrid"

 repositories = {
     my-awesome-terraform-module = {
       repository_template = "terraform-automation-module-starter"
       required_approving_review_count = 2
     }
     my-awesome-terraform-project = {
       repository_template = "terraform-automation-project-starter"
     }
 }
}

Requirements

Name Version
terraform >= 1.3.0
github ~> 6.2

Resources

Name Type
github_branch_protection.this_main resource
github_repository.this resource
github_team_repository.this_terraform resource
github_team_repository.this_terraform_admin resource

Inputs

Name Description Type Default Required
create Whether to create repositories bool true no
github_owner Owner of the GitHub repository string n/a yes
is_template Boolean to set the repositories given as template or not bool false no
repositories A map of Repository objects and their source template repos
map(object({
repository_template = optional(string, "")
required_approving_review_count = optional(number, 2)
visibility = optional(string, "private")
required_linear_history = optional(bool, false)
archived = optional(bool, false)
}))
n/a yes

Outputs

Name Description
github_repositories A map of the Github repositories.

Note: Manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml .

About

Terraform module for GitHub repository creation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages