From 7f0ddaae3d7307d1ab4a0e0cb6e3c48dc8903e27 Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Wed, 19 Feb 2025 13:31:51 -0800 Subject: [PATCH] Fix variable declaration syntax and update branch protection logic for clarity --- branch_protection.tf | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/branch_protection.tf b/branch_protection.tf index c7664f6..d999981 100644 --- a/branch_protection.tf +++ b/branch_protection.tf @@ -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 diff --git a/variables.tf b/variables.tf index 8d0cf75..3ac9702 100644 --- a/variables.tf +++ b/variables.tf @@ -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