Skip to content

A Terraform module for GitHub repositories in the Ministry of Justice • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/terraform-github-repository

Repository files navigation

Terraform Module for GitHub Repositories

repo standards badge

Module in Terraform registry: https://registry.terraform.io/modules/ministryofjustice/repository/github/latest

Setup Pre-commit

Setup Terraform format pre-commit

`make setup-precommit'

Usage

module "repository" {
  source  = "ministryofjustice/repository/github"
  version = "n.n.n"

  name = ""
  application_name = ""
  description = ""
}

Looking for issues?

If you want to raise an issue with this module, please create a new issue in the Operations Engineering repository.

Requirements

Name Version
terraform ~> 1.0
github ~> 5.0

Providers

Name Version
github ~> 5.0

Modules

No modules.

Resources

Name Type
github_actions_secret.default resource
github_actions_variable.default resource
github_branch_protection.default resource
github_repository.default resource
github_repository_tag_protection.default resource
github_team_repository.admin resource
github_team_repository.maintain resource
github_team_repository.pull resource
github_team_repository.push resource
github_actions_public_key.default data source

Inputs

Name Description Type Default Required
archive_on_destroy Archive repository instead of deleting it on destroy bool true no
description Repository description string n/a yes
has_discussions Enable repository discussions bool false no
homepage_url Repository homepage URL string "" no
name Repository name string n/a yes
required_checks List of required checks list(string) [] no
secrets key:value map for GitHub actions secrets map(any) {} no
team_access Team access types for created repository
object({
admin = optional(list(string))
maintain = optional(list(string))
push = optional(list(string))
pull = optional(list(string))
})
{
"admin": [],
"maintain": [],
"pull": [],
"push": []
}
no
topics n/a list(string) [] no
type Type of repository: core, module, template. Defaults to core string "core" no
variables key:value map for repository variables map(any) {} no
visibility Visibility type: public, internal, private string "public" no

Outputs

Name Description
actions_variables n/a
admins n/a
branch_protection n/a
maintainers n/a
pullers n/a
pushers n/a
repository n/a
tag_protection n/a