Skip to content

Commit

Permalink
Fix variable declaration syntax and update branch protection logic fo…
Browse files Browse the repository at this point in the history
…r clarity
  • Loading branch information
Dave Arnold committed Feb 19, 2025
1 parent a3f229d commit 7f0ddaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion branch_protection.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ locals {
# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection
resource "github_branch_protection" "protection" {
for_each = {
for k, v in local.branch_protection_rules : k => v if var.enforce_prs
for k, v in local.branch_protection_rules : k => v if var.enforce_prs
}

repository_id = var.create_repo ? github_repository.repo[0].node_id : data.github_repository.existing[0].node_id
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ variable "require_signed_commits" {
default = false
}

variable require_last_push_approval {
variable "require_last_push_approval" {
description = "Require approval from the last pusher"
type = bool
default = false
Expand Down

0 comments on commit 7f0ddaa

Please sign in to comment.