From 1193afe0019de7001aa0a5aece7a85449027f8e1 Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Tue, 18 Feb 2025 21:55:27 -0800 Subject: [PATCH] Enhance branch protection dependencies to include codeowners and extra files for improved resource management --- branch_protection.tf | 7 ++++++- data.tf | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/branch_protection.tf b/branch_protection.tf index a6af049..402eae3 100644 --- a/branch_protection.tf +++ b/branch_protection.tf @@ -47,5 +47,10 @@ resource "github_branch_protection" "protection" { } } - depends_on = [local.repo_exists] + depends_on = [ + local.repo_exists, + github_repository_file.codeowners, + github_repository_file.extra_files, + github_repository_file.managed_extra_files + ] } \ No newline at end of file diff --git a/data.tf b/data.tf index cbabe60..7695660 100644 --- a/data.tf +++ b/data.tf @@ -4,6 +4,5 @@ locals { data "github_repository" "existing" { count = var.create_repo ? 0 : 1 - name = var.name - full_name = var.repo_org != null ? "${var.repo_org}/${var.name}" : var.name + full_name = "${var.repo_org}/${var.name}" }