Skip to content

Commit

Permalink
Fix repository_id reference in branch protection resource to access t…
Browse files Browse the repository at this point in the history
…he correct GitHub repository element
  • Loading branch information
Dave Arnold committed Feb 19, 2025
1 parent 94facd8 commit bca81ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github_branch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bca81ee

Please sign in to comment.