From bca81ee5654004a447d746ead9c2db04071ad0c2 Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Tue, 18 Feb 2025 21:12:08 -0800 Subject: [PATCH] Fix repository_id reference in branch protection resource to access the correct GitHub repository element --- github_branch.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_branch.tf b/github_branch.tf index fff0430..8e438d6 100644 --- a/github_branch.tf +++ b/github_branch.tf @@ -38,7 +38,7 @@ locals { resource "github_branch_protection" "main" { count = var.create_repo && (var.enforce_prs && !var.github_is_private) || var.github_is_private ? 1 : 0 - repository_id = github_repository.repo.node_id + repository_id = github_repository.repo[0].node_id pattern = var.github_default_branch enforce_admins = var.github_enforce_admins_branch_protection allows_deletions = false