From 02a34ab68a8d6da5467205082929c20657bc4f64 Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Tue, 7 May 2024 09:08:56 -0700 Subject: [PATCH 1/2] create_codeowners --- github_files.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github_files.tf b/github_files.tf index 07ae2a9..a1ef4d1 100644 --- a/github_files.tf +++ b/github_files.tf @@ -1,5 +1,6 @@ # https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file resource "github_repository_file" "codeowners" { + count = var.create_codeowners ? 1 : 0 repository = github_repository.repo.name branch = var.github_default_branch file = "CODEOWNERS" @@ -26,4 +27,4 @@ resource "github_repository_file" "extra_files" { branch ] } -} \ No newline at end of file +} From 71fef26ef222f90dc0b1dc73bd5fe37be9b5d757 Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Tue, 7 May 2024 09:09:30 -0700 Subject: [PATCH 2/2] Update variables.tf --- variables.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variables.tf b/variables.tf index 89234e1..ab97845 100644 --- a/variables.tf +++ b/variables.tf @@ -152,3 +152,7 @@ variable "pull_request_bypassers" { type = list(any) } +variable create_codeowners { + default = true + type = bool +}