Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add components dir and config template + update defaults #3

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It's Open Source and licensed under the [APACHE2](LICENSE).

## Components

- [GitHub Repositories](./github-repositories/README.md): responsible for managing GitHub repositories, including permissions, webhooks, pages, etc.
- [GitHub Repositories](./components/github-repositories/README.md): responsible for managing GitHub repositories, including permissions, webhooks, pages, etc.

## Trunk Linter

Expand Down

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@ variable "repos" {
type = map(object({
# Main Resource Configuration
# https://github.com/mineiros-io/terraform-github-repository/tree/main#main-resource-configuration
allow_auto_merge = optional(bool, false)
allow_merge_commit = optional(bool, true)
allow_rebase_merge = optional(bool, false)
allow_squash_merge = optional(bool, false)
archive_on_destroy = optional(bool, true)
archived = optional(bool, false)
default_branch = optional(string, null)
description = optional(string, "")
extra_topics = optional(list(string), [])
has_downloads = optional(bool, false)
has_issues = optional(bool, false)
has_projects = optional(bool, false)
has_wiki = optional(bool, false)
homepage_url = optional(string, "")
is_template = optional(bool, false)
allow_auto_merge = optional(bool, false)
allow_merge_commit = optional(bool, false)
allow_rebase_merge = optional(bool, false)
allow_squash_merge = optional(bool, false)
archive_on_destroy = optional(bool, true)
archived = optional(bool, false)
default_branch = optional(string, "main")
delete_branch_on_merge = optional(bool, true)
description = optional(string, "")
extra_topics = optional(list(string), [])
has_downloads = optional(bool, true)
has_issues = optional(bool, true)
has_projects = optional(bool, true)
has_wiki = optional(bool, false)
homepage_url = optional(string, "")
is_template = optional(bool, false)
pages = optional(object({
branch = string
cname = optional(string, null)
path = optional(string, "/")
}))
topics = optional(list(string), [])
visibility = optional(string, "private")
vulnerability_alerts = optional(bool, false)
vulnerability_alerts = optional(bool, true)

# Extended Resource Configuration

Expand Down Expand Up @@ -86,7 +87,6 @@ variable "repos" {
# https://github.com/mineiros-io/terraform-github-repository/tree/main#branch-protections-v4-configuration
branch_protections_v4 = optional(list(object({
pattern = string
_key = optional(string)
allows_deletions = optional(bool, false)
allows_force_pushes = optional(bool, false)
blocks_creations = optional(bool, false)
Expand All @@ -95,18 +95,18 @@ variable "repos" {
require_conversation_resolution = optional(bool, false)
require_signed_commits = optional(bool, false)
required_linear_history = optional(bool, false)
required_pull_request_reviews = optional(list(object({
required_pull_request_reviews = optional(object({
dismiss_stale_reviews = optional(bool, true)
restrict_dismissals = optional(bool, false)
dismissal_restrictions = optional(list(string), [])
pull_request_bypassers = optional(list(string), [])
require_code_owner_reviews = optional(bool, true)
required_approving_review_count = optional(number, 1)
})), [])
required_status_checks = optional(list(object({
}), {})
required_status_checks = optional(object({
strict = optional(bool, false)
contexts = optional(list(string), [])
})), [])
}), {})
})), [])

## Issue Labels Configuration
Expand Down
5 changes: 5 additions & 0 deletions templates/component.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
component:
name: COMPONENT_NAME
source:
uri: https://api.github.com/repos/masterpointio/terraform-components/tarball/
version: COMPONENT_VERSION