From 645a699a93fc185a676a51b251149e30ddfaade6 Mon Sep 17 00:00:00 2001 From: annuay Date: Fri, 10 Jan 2025 19:38:30 +0000 Subject: [PATCH] flip validation condition --- modules/network/vpc/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/network/vpc/main.tf b/modules/network/vpc/main.tf index aba18fc591..bea21260e8 100644 --- a/modules/network/vpc/main.tf +++ b/modules/network/vpc/main.tf @@ -17,7 +17,7 @@ resource "terraform_data" "secondary_ranges_validation" { lifecycle { precondition { - condition = length(var.secondary_ranges) == 0 || length(var.secondary_ranges_list) == 0 + condition = !(length(var.secondary_ranges) > 0 && length(var.secondary_ranges_list) > 0) error_message = "Only one of var.secondary_ranges or var.secondary_ranges_list should be specified" } }