Terraform module to configure a Github repository.
Name | Version |
---|---|
github | ~> 4.0 |
Name | Version |
---|---|
github | ~> 4.0 |
Name | Type |
---|---|
github_repository.repo | resource |
terraform-github-modules/github_repository/
Name | Description | Type | Default | Required |
---|---|---|---|---|
allow_auto_merge | Allow auto-merging of pull requests. | bool |
false |
no |
allow_merge_commit | Allow merge commits. | bool |
true |
no |
allow_rebase_merge | Allow rebase merge commits. | bool |
true |
no |
allow_squash_merge | Allow squash merge commits. | bool |
true |
no |
auto_init | Create an initial commit in a new repository. | bool |
true |
no |
delete_branch_on_merge | Delete branch on pull request merge. | bool |
false |
no |
from_template | Was this repo generated from a template repo? | bool |
false |
no |
gitignore_template | Template for the gitignore file. | string |
null |
no |
has_downloads | Set to true to enable the (deprecated) downloads features on the repository. | bool |
false |
no |
has_issues | Enable the GitHub issues feature for this repository. | bool |
false |
no |
has_projects | Enable the GitHub projects feature for this repository. | bool |
false |
no |
has_wiki | Enable the GitHub wiki feature for this repository. | bool |
false |
no |
is_template | Set this repository as a template. | bool |
false |
no |
license_template | Template for the license file. | string |
null |
no |
repo_description | A description of the repository. | string |
n/a | yes |
repo_name | The name of the repository. | string |
n/a | yes |
repo_visibility | Repository visibility; either 'public' or 'private'. | string |
n/a | yes |
template_repo_name | The name of the template repository. | string |
null |
no |
template_repo_owner | The GitHub organization or user the template repository is owned by. | string |
null |
no |
topics | The list of topics of the repository. | list(any) |
null |
no |
vulnerability_alerts | Enable security alerts for vulnerable dependencies. | bool |
false |
no |
terraform-github-modules/github_repository_collaborator/
Name | Description | Type | Default | Required |
---|---|---|---|---|
collaborator_name | The user to add to the repository as a collaborator. | string |
n/a | yes |
collaborator_permission | The permission of the outside collaborator for the repository. | string |
"push" |
no |
repo_name | The GitHub repository name. | string |
n/a | yes |
terraform-github-modules/github_repository_webhook/
Name | Description | Type | Default | Required |
---|---|---|---|---|
active | Indicate if the webhook should receive events. | bool |
true |
no |
content_type | The content type for the payload. | string |
n/a | yes |
events | A list of events which should trigger the webhook. | list(string) |
n/a | yes |
insecure_ssl | Insecure SSL boolean toggle. | bool |
false |
no |
repo_name | The name of the repository. | string |
n/a | yes |
secret | The shared secret for the webhook. | string |
n/a | yes |
url | The URL of the webhook. | string |
n/a | yes |
No outputs.
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.
- 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