From ca1be31fa02e9ec33b48e3a69b0b5bf3a7cf78c0 Mon Sep 17 00:00:00 2001 From: Johan Fagerberg Date: Mon, 7 Jul 2025 12:34:14 +0000 Subject: [PATCH] fix: allow empty string as Route53 record name This follows the documentation, which says: 'If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB.' --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 84317650..258251b6 100644 --- a/main.tf +++ b/main.tf @@ -15,12 +15,12 @@ locals { locals { route53_records = { A = { - name = try(coalesce(var.route53_record_name, var.name), "") + name = try(var.route53_record_name != null ? var.route53_record_name : var.name, "") type = "A" zone_id = var.route53_zone_id } AAAA = { - name = try(coalesce(var.route53_record_name, var.name), "") + name = try(var.route53_record_name != null ? var.route53_record_name : var.name, "") type = "AAAA" zone_id = var.route53_zone_id }