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/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 } } diff --git a/variables.tf b/variables.tf index fca1d44..3b20308 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 = optional(bool, false) }) default = null }