terraform-github-default-repository
Resource that allows to declare branch protection rules for repository.
Name
Description
Type
Default
Required
repository_name
Name of the repository that is point of module
string
n/a
yes
repository_description
Description that will be visible on board of projects inside GitHub
string
n/a
yes
homepage_url
URL of a page describing the project
string
""
no
repository_private
Set repository visible outside of organization. (Default: true)
bool
true
no
archived
Set to true to archive repository. (Default: false)
bool
false
no
pull_teams
Teams ids that will have read-only access to the repository.
list(string)
[]
no
push_teams
Teams ids that will have read-write access to the repository.
list(string)
[]
no
admin_teams
Teams ids that will have admin access over the repository.
list(string)
[]
no
is_template
If set to true then repository can be used as a template for other repositories
bool
false
no
template
If passed, then repository will be created from the template.
object({ owner = string repository = string })
null
no
allow_rebase
Allow developers to modify history of commits.
bool
false
no
license_template
License template eg: "mit", "mpl-2.0".
string
null
no
has_issues
Enables GitHub Issues feature
bool
false
no
has_projects
Enables GitHub Projects feature
bool
false
no
has_wiki
Enables GitHub Wiki feature
bool
false
no
vulnerability_alerts
Set to enable security alerts for vulnerable dependencies
bool
false
no
module "some-repo" {
source = " git@github.com:masterborn/terraform-github-default-repository.git?ref=v1.0.2"
repository_name = " some-repo"
repository_description = " Example repo"
allow_rebase = true
admin_teams = [module . some-team . admins_id ]
push_teams = [module . some-team . developers_id ]
pull_teams = [module . some-team . visitors_id , module . some-team . testers_id ]
}
Enabling pre-commit hooks
Following pre-commit hooks are provided:
To install pre-commit check .