Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inetum-poland/terraform-github-repository
Inetum Poland TF module github-repository.
https://github.com/inetum-poland/terraform-github-repository
github inetum poland terraform-module
Last synced: about 1 month ago
JSON representation
Inetum Poland TF module github-repository.
- Host: GitHub
- URL: https://github.com/inetum-poland/terraform-github-repository
- Owner: Inetum-Poland
- License: mit
- Created: 2024-04-03T11:20:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T10:44:35.000Z (2 months ago)
- Last Synced: 2024-10-21T15:26:22.080Z (2 months ago)
- Topics: github, inetum, poland, terraform-module
- Language: HCL
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Preconfigured Terraform module for `github_repository`.
[![pre_commit](https://github.com/Inetum-Poland/tf-module-github-repository/actions/workflows/pre_commit.yml/badge.svg)](https://github.com/Inetum-Poland/tf-module-github-repository/actions/workflows/pre_commit.yml) [![trufflehog](https://github.com/Inetum-Poland/tf-module-github-repository/actions/workflows/trufflehog.yaml/badge.svg)](https://github.com/Inetum-Poland/tf-module-github-repository/actions/workflows/trufflehog.yaml)
This module creates a preconfigured GitHub repository.
> [!IMPORTANT]
> __This repository uses the [Conventional Commits](https://www.conventionalcommits.org/).__
>
> For more information please see the [Conventional Commits documentation](https://www.conventionalcommits.org/en/v1.0.0/#summary).> [!IMPORTANT]
> __This repository uses the [pre-commit](https://pre-commit.com/).__
>
> Please be respectful while contributing and after cloning this repo install the pre-commit hooks.
> ```bash
> > pre-commit install --install-hooks -t pre-commit -t commit-msg
> ```
> For more information please see the [pre-commit documentation](https://pre-commit.com/).## Providers
| Name | Version |
|------|---------|
| [github](#provider\_github) | 6.3.1 |## Requirements
| Name | Version |
|------|---------|
| [github](#requirement\_github) | ~> 6.0 |## Resources
| Name | Type |
|------|------|
| [github_actions_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource |
| [github_actions_variable.variable](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource |
| [github_branch_default.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource |
| [github_branch_protection.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource |
| [github_dependabot_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/dependabot_secret) | resource |
| [github_issue_label.label](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/issue_label) | resource |
| [github_repository.repository](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |
| [github_repository_ruleset.ruleset](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_ruleset) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [github\_actions\_secret](#input\_github\_actions\_secret) | Actions secret repository settings object `github_actions_secret`. | `map(string)` | `{}` | no |
| [github\_actions\_variable](#input\_github\_actions\_variable) | Actions variable repository settings object `github_actions_variable`. | `map(string)` | `{}` | no |
| [github\_branch\_default](#input\_github\_branch\_default) | Default branch repository settings object `github_branch_default`. | `string` | `null` | no |
| [github\_branch\_protection](#input\_github\_branch\_protection) | Branch protection repository settings object `github_branch_protection`. |map(object({| `{}` | no |
pattern = string
allows_deletions = optional(bool, false)
allows_force_pushes = optional(bool, false)
enforce_admins = optional(bool, false)
force_push_bypassers = optional(list(string), [])
lock_branch = optional(bool, false)
require_conversation_resolution = optional(bool, true)
require_signed_commits = optional(bool, false)
required_linear_history = optional(bool, false)
required_pull_request_reviews = optional(object({
dismiss_stale_reviews = optional(bool, true)
require_code_owner_reviews = optional(bool, true)
require_last_push_approval = optional(bool, true)
required_approving_review_count = optional(number, 1)
restrict_dismissals = optional(bool, false)
}), {})
required_status_checks = optional(object({
contexts = optional(list(string), [])
strict = optional(bool, true)
}), {})
}))
| [github\_dependabot\_secret](#input\_github\_dependabot\_secret) | Dependabot secret repository settings object `github_dependabot_secret`. | `map(string)` | `{}` | no |
| [github\_issue\_label](#input\_github\_issue\_label) | Issue labels repository settings object `github_issue_label`. |map(object({| `{}` | no |
name = string
color = string
description = optional(string, null)
}))
| [github\_repository](#input\_github\_repository) | Repository settings object `github_repository`. |object({| n/a | yes |
name = string
description = optional(string)
topics = optional(list(string), [])
is_template = optional(bool, false)
visibility = optional(string, "private")
# auto_init = optional(bool, true)
has_downloads = optional(bool, false)
has_issues = optional(bool, false)
has_projects = optional(bool, false)
has_wiki = optional(bool, false)
has_discussions = optional(bool, false)
homepage_url = optional(string)
allow_merge_commit = optional(bool, true)
allow_squash_merge = optional(bool, true)
allow_rebase_merge = optional(bool, true)
allow_auto_merge = optional(bool, false)
allow_update_branch = optional(bool, true)
squash_merge_commit_title = optional(string, null) # "PR_TITLE"
squash_merge_commit_message = optional(string, null) # "PR_BODY"
merge_commit_title = optional(string, null) # "PR_TITLE"
merge_commit_message = optional(string, null) # "PR_BODY"
delete_branch_on_merge = optional(bool, true)
# license_template = optional(string)
archive_on_destroy = optional(bool, true)
web_commit_signoff_required = optional(bool, false)
vulnerability_alerts = optional(bool, true)
ignore_vulnerability_alerts_during_read = optional(bool, true)
template = optional(object({
owner = string
repository = any
include_all_branches = optional(bool, false)
}), null)
pages = optional(object({
source = object({
branch = string
path = string
})
build_type = string
cname = string
}), null)
security_and_analysis = optional(object({
advanced_security = optional(object({
status = optional(string, "enabled")
}), {})
secret_scanning = optional(object({
status = optional(string, "enabled")
}), {})
secret_scanning_push_protection = optional(object({
status = optional(string, "enabled")
}), {})
}), {})
})
| [github\_repository\_ruleset](#input\_github\_repository\_ruleset) | Branch protection repository settings object `github_branch_protection`. |map(object({| `{}` | no |
enforcement = string
# name = string
target = string
# repository = string
rules = list(object({
branch_name_pattern = optional(object({
operator = string
pattern = string
name = optional(string, null)
negate = optional(bool, false)
}), null)
commit_author_email_pattern = optional(object({
operator = string
pattern = string
name = optional(string, null)
negate = optional(bool, false)
}), null)
commit_message_pattern = optional(object({
operator = string
pattern = string
name = optional(string, null)
negate = optional(bool, false)
}), null)
committer_email_pattern = optional(object({
operator = string
pattern = string
name = optional(string, null)
negate = optional(bool, false)
}), null)
creation = optional(bool, false)
deletion = optional(bool, false)
non_fast_forward = optional(bool, false)
pull_request = optional(object({
dismiss_stale_reviews_on_push = optional(bool, false)
require_code_owner_reviews = optional(bool, false)
require_last_push_approval = optional(bool, false)
required_approving_review_count = optional(number, 0)
required_review_thread_resolution = optional(bool, false)
}), null)
required_deployments = optional(object({
required_deployment_environments = list(string)
}), null)
required_linear_history = optional(bool, false)
required_signatures = optional(bool, false)
required_status_checks = optional(object({
required_check = list(object({
context = string
integration_id = optional(number, null)
}))
strict_required_status_checks_policy = optional(bool, false)
}), null)
tag_name_pattern = optional(object({
operator = string
pattern = string
name = optional(string, null)
negate = optional(bool, false)
}), null)
update = optional(bool, false)
update_allows_fetch_and_merge = optional(bool, false)
}))
bypass_actors = optional(list(object({
actor_id = number
actor_type = optional(string, null)
bypass_mode = optional(string, null)
})), null)
conditions = optional(object({
ref_name = optional(object({
exclude = optional(list(string), [])
include = optional(list(string), [])
}), null)
}), null)
}))## Modules
No modules.
## Outputs
| Name | Description |
|------|-------------|
| [out](#output\_out) | Repository settings object `github_repository`. |## Contributions
This module is created by Inetum Poland. Feel free to contribute to it.