From 852a1148e18c1cd377fac87b1b3b5a6a4b191d55 Mon Sep 17 00:00:00 2001 From: Ray Smets Date: Fri, 29 Nov 2024 10:27:45 -0800 Subject: [PATCH 1/3] [Template] resource usage updated to include branch definition. --- main.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index dacb337..abbcf86 100644 --- a/main.tf +++ b/main.tf @@ -131,8 +131,9 @@ resource "github_repository" "repository" { for_each = local.template content { - owner = template.value.owner - repository = template.value.repository + owner = template.value.owner + repository = template.value.repository + include_all_branches = template.value.include_all_branches } } From 72de598c9ed558bc2c11125ce284a752e5ae408d Mon Sep 17 00:00:00 2001 From: Ray Smets Date: Fri, 29 Nov 2024 10:43:45 -0800 Subject: [PATCH 2/3] vars --- variables.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index fca1d44..5ea43cd 100644 --- a/variables.tf +++ b/variables.tf @@ -194,8 +194,9 @@ variable "extra_topics" { variable "template" { description = "(Optional) Template repository to use. (Default: {})" type = object({ - owner = string - repository = string + owner = string + repository = string + include_all_branches = bool }) default = null } From b4531365586f6cd5f659d7ad16da0c3ce6eafa80 Mon Sep 17 00:00:00 2001 From: gaima8 <7595658+gaima8@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:07:35 +0000 Subject: [PATCH 3/3] default is false --- README.md | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c9b26a..cb246bd 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ See [variables.tf] and [examples/] for details and use-cases. | [security\_and\_analysis](#input\_security\_and\_analysis) | (Optional) Security and analysis configuration for the repository.

- All fields except org\_advanced\_security are strings: "enabled" or "disabled".
- org\_advanced\_security is a bool indicating whether the org has split licensing for Advanced Security. |
object({
org_advanced_security = optional(bool, false)
advanced_security = optional(string, "disabled")
code_security = optional(string, "disabled")
secret_scanning = optional(string, "disabled")
secret_scanning_push_protection = optional(string, "disabled")
secret_scanning_ai_detection = optional(string, "disabled")
secret_scanning_non_provider_patterns = optional(string, "disabled")
})
| `null` | no | | [squash\_merge\_commit\_message](#input\_squash\_merge\_commit\_message) | (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. | `string` | `"COMMIT_MESSAGES"` | no | | [squash\_merge\_commit\_title](#input\_squash\_merge\_commit\_title) | (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. | `string` | `"COMMIT_OR_PR_TITLE"` | no | -| [template](#input\_template) | (Optional) Template repository to use. (Default: {}) |
object({
owner = string
repository = string
})
| `null` | no | +| [template](#input\_template) | (Optional) Template repository to use. (Default: {}) |
object({
owner = string
repository = string
include_all_branches = optional(bool, false)
})
| `null` | no | | [topics](#input\_topics) | (Optional) The list of topics of the repository. (Default: []) | `list(string)` | `null` | no | | [triage\_collaborators](#input\_triage\_collaborators) | (Optional) A list of users to add as collaborators granting them triage permission. | `list(string)` | `[]` | no | | [triage\_team\_ids](#input\_triage\_team\_ids) | (Optional) A list of teams (by id) to grant triage permission to. | `list(string)` | `[]` | no | diff --git a/variables.tf b/variables.tf index 5ea43cd..3b20308 100644 --- a/variables.tf +++ b/variables.tf @@ -196,7 +196,7 @@ variable "template" { type = object({ owner = string repository = string - include_all_branches = bool + include_all_branches = optional(bool, false) }) default = null }