From 09c1f366ebcd72fd7aa80c60152d6b7c42b79890 Mon Sep 17 00:00:00 2001 From: Alex Trepanier Date: Fri, 17 May 2024 15:24:16 -0400 Subject: [PATCH] fix: Update validation for aliases parent zone --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 3568dfe..224e467 100644 --- a/main.tf +++ b/main.tf @@ -142,7 +142,7 @@ module "alb_dns_alias" { resource "null_resource" "aliases_parent_zone_validation" { lifecycle { precondition { - condition = local.alb_alias_enabled && var.parent_zone_id == null && var.parent_zone_id == null + condition = local.alb_alias_enabled && !(var.parent_zone_id == null && var.parent_zone_name == null) error_message = "When using `alb_dns_aliases` you should specify either `parent_zone_id` or `parent_zone_name`." } }