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}" }