Skip to content

Repository files navigation

terraform-github-modules

Terraform module to configure a Github repository.

Requirements

NameVersion
github~> 4.0

Providers

NameVersion
github~> 4.0

Resources

NameType
github_repository.reporesource

Modules

github_repository

terraform-github-modules/github_repository/

NameDescriptionTypeDefaultRequired
allow_auto_mergeAllow auto-merging of pull requests.boolfalseno
allow_merge_commitAllow merge commits.booltrueno
allow_rebase_mergeAllow rebase merge commits.booltrueno
allow_squash_mergeAllow squash merge commits.booltrueno
auto_initCreate an initial commit in a new repository.booltrueno
delete_branch_on_mergeDelete branch on pull request merge.boolfalseno
from_templateWas this repo generated from a template repo?boolfalseno
gitignore_templateTemplate for the gitignore file.stringnullno
has_downloadsSet to true to enable the (deprecated) downloads features on the repository.boolfalseno
has_issuesEnable the GitHub issues feature for this repository.boolfalseno
has_projectsEnable the GitHub projects feature for this repository.boolfalseno
has_wikiEnable the GitHub wiki feature for this repository.boolfalseno
is_templateSet this repository as a template.boolfalseno
license_templateTemplate for the license file.stringnullno
repo_descriptionA description of the repository.stringn/ayes
repo_nameThe name of the repository.stringn/ayes
repo_visibilityRepository visibility; either 'public' or 'private'.stringn/ayes
template_repo_nameThe name of the template repository.stringnullno
template_repo_ownerThe GitHub organization or user the template repository is owned by.stringnullno
topicsThe list of topics of the repository.list(any)nullno
vulnerability_alertsEnable security alerts for vulnerable dependencies.boolfalseno

github_repository_collaborator

terraform-github-modules/github_repository_collaborator/

NameDescriptionTypeDefaultRequired
collaborator_nameThe user to add to the repository as a collaborator.stringn/ayes
collaborator_permissionThe permission of the outside collaborator for the repository.string"push"no
repo_nameThe GitHub repository name.stringn/ayes

github_repository_webhook

terraform-github-modules/github_repository_webhook/

NameDescriptionTypeDefaultRequired
activeIndicate if the webhook should receive events.booltrueno
content_typeThe content type for the payload.stringn/ayes
eventsA list of events which should trigger the webhook.list(string)n/ayes
insecure_sslInsecure SSL boolean toggle.boolfalseno
repo_nameThe name of the repository.stringn/ayes
secretThe shared secret for the webhook.stringn/ayes
urlThe URL of the webhook.stringn/ayes

Outputs

No outputs.

Using the modules

Set the module source in your module configuration:

source = "github.com/glitchcrab/terraform-github-modules//github_repository"

Note: the // is important as it tells Terraform that it's a child directory of the main module repo.

Adding a new module

  • Create the directory and populate it with Terraform manifests.
  • Symlink _versions.tf from the root directory into the module directory.
  • Generate an inputs reference for the new module with the command below and add it to the README:
terraform-docs markdown table <module_dir> --escape=false

About

Terraform modules to manage Github repos

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages