A terraform module to create an organization repository and configure team access as well as branch protections. Note: this will only create an organizational repository
At the moment, testing is manual:
# Replace "xxx" with an your github access token, then execute the integration tests.
export GITHUB_TOKEN=xxx
make terraform/pytest PYTEST_ARGS="-v --nomock"
Name | Version |
---|---|
terraform | >= 0.14 |
github | >= 4.0 |
Name | Version |
---|---|
github | >= 4.0 |
Name | Type |
---|---|
github_team.teams | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | Name of the repository | string |
n/a | yes |
allow_merge_commit | Whether to allow merge commits | bool |
false |
no |
allow_rebase_merge | Whether to allow rebase merging | bool |
true |
no |
allow_squash_merge | Whether to allow squash merging | bool |
false |
no |
archive_on_destroy | Whether to archive on destroy instead of delete | bool |
false |
no |
auto_init | Automatically initialize the repository upon creation | bool |
true |
no |
branch_protection | Branch protection configuration | object({ |
null |
no |
delete_branch_on_merge | Automatically delete head branch after a pull request is merged | bool |
true |
no |
description | Description of the repository | string |
null |
no |
gitignore_template | Gitignore template to include in the repository | string |
null |
no |
has_issues | Enable the GitHub Issues features on the repository | bool |
true |
no |
has_projects | Enable the GitHub Projects features on the repository | bool |
false |
no |
has_wiki | Enable the GitHub Wiki features on the repository | bool |
false |
no |
homepage_url | URL of a page describing the project | string |
null |
no |
is_template | Configure this repository as a template repository | bool |
false |
no |
license_template | Type of license to include in the repository | string |
null |
no |
teams | List of teams to grant permissions to the repository | list(object({ |
[] |
no |
template | Template repository used to create this repository | object({ |
null |
no |
topics | List of topics to apply to the repository | list(string) |
[] |
no |
visibility | Visibility of the repository. One of: public , private , or internal |
string |
"public" |
no |
vulnerability_alerts | Whether to enable security alerts for dependencies | bool |
true |
no |
Name | Description |
---|---|
repo | Object with all repo attributes |