File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ resource "github_branch_default" "default" {
181181# ---------------------------------------------------------------------------------------------------------------------
182182
183183resource "github_branch_protection" "this" {
184- for_each = coalesce (var. branch_protections_v4 , {})
184+ for_each = length ( coalesce (var. branch_protections_v4 , {})) > 0 ? var . branch_protections_v4 : {}
185185
186186 # ensure we have all members and collaborators added before applying
187187 # any configuration for them
@@ -232,7 +232,7 @@ resource "github_branch_protection" "this" {
232232# ---------------------------------------------------------------------------------------------------------------------
233233
234234resource "github_branch_protection_v3" "branch_protection" {
235- count = var. branch_protections_v4 == null ? length (local. branch_protections_v3 ) : 0
235+ count = length ( coalesce ( var. branch_protections_v4 , {})) == 0 ? length (local. branch_protections_v3 ) : 0
236236
237237 # ensure we have all members and collaborators added before applying
238238 # any configuration for them
You can’t perform that action at this time.
0 commit comments