Skip to content

Terraform module which creates GitHub repository resources.

Notifications You must be signed in to change notification settings

ALT-F4-LLC/terraform-github-repository

Repository files navigation

terraform-github-repository

Terraform module which creates GitHub repository resources.

Breaking Changes

0.11.0

  • removes github_team data lookup passed from teams variable
  • uses team id instead of name as key in teams variable

Example

teams = { "1234567890" = "maintain" }

Requirements

Name Version
github ~> 6.0

Providers

Name Version
github ~> 6.0

Modules

No modules.

Resources

Name Type
github_branch_protection.self resource
github_repository.self resource
github_repository_webhook.self resource
github_team_repository.self resource

Inputs

Name Description Type Default Required
allow_auto_merge Whether to allow auto-merging pull requests bool false no
allow_merge_commit Whether to allow merge commits bool false no
allow_rebase_merge Whether to allow rebase merges bool true no
allow_squash_merge Whether to allow squash merges bool true no
description The description of the repository string n/a yes
dismiss_stale_reviews Whether to enable dismissing stale pull request reviews bool true no
enable_pages Whether to enable GitHub Pages bool false no
enforce_admins Whether to enforce branch protection for administrators bool false no
gitignore_template The gitignore template of the repository string null no
has_branch_protection Whether the repository has branch protection enabled bool true no
has_discussions Whether the repository has discussions enabled bool false no
has_issues Whether the repository has issues enabled bool false no
has_projects Whether the repository has projects enabled bool false no
has_wiki Whether the repository has wiki enabled bool false no
homepage_url The URL of a page to use as the repository's home page string null no
license_template Wheter the repository uses a license template string null no
name The name of the repository string n/a yes
owner The owner of the repository string n/a yes
pages_branch The branch to use for GitHub Pages string null no
pages_build_type The build type of the GitHub Pages string "workflow" no
pages_cname The custom domain of the GitHub Pages string null no
pages_path The path to the GitHub Pages content string null no
required_approving_review_count The number of approving reviews required to change code number 0 no
required_status_checks_contexts The list of status checks to require in order to merge into this branch list(string) [] no
teams The team ids to grant access to, and their permission levels map(string) {} no
topics The topics of the repository list(string) [] no
visibility The visibility of the repository string "private" no
vulnerability_alerts Whether the repository has vulnerability alerts enabled bool false no
webhooks Webhooks to configure for the repository
map(object({
active = bool
events = list(string)
content_type = string
url = string
}))
{} no

Outputs

Name Description
full_name The full name of the repository.
git_clone_url The Git URL of the repository.
html_url The HTML URL of the repository.
http_clone_url The HTTP URL of the repository.
node_id The Node ID of the repository.
repo_id The ID of the repository.
ssh_clone_url The SSH URL of the repository.
svn_url The SVN URL of the repository.