From 63b47b59b5d44b39d13897ce06dc32b816dfd18f Mon Sep 17 00:00:00 2001 From: beatz174-bit Date: Wed, 13 May 2026 06:23:03 +1000 Subject: [PATCH] Align wildcard DNS name sanitization across outputs and generator --- infrastructure/terraform/dynu/inventory.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure/terraform/dynu/inventory.tf b/infrastructure/terraform/dynu/inventory.tf index ecaffa0..a13c08c 100644 --- a/infrastructure/terraform/dynu/inventory.tf +++ b/infrastructure/terraform/dynu/inventory.tf @@ -7,9 +7,9 @@ locals { for record in data.dynu_dns_records.root.records : format( "%s_%s", - can(regex("^[a-z]", regexreplace(lower(format("%s_%s", record.hostname, record.record_type)), "[^a-z0-9]+", "_"))) - ? trim(regexreplace(lower(format("%s_%s", record.hostname, record.record_type)), "[^a-z0-9]+", "_"), "_") - : format("record_%s", trim(regexreplace(lower(format("%s_%s", record.hostname, record.record_type)), "[^a-z0-9]+", "_"), "_")), + can(regex("^[a-z]", regexreplace(replace(lower(format("%s_%s", record.hostname, record.record_type)), "*", "wildcard"), "[^a-z0-9]+", "_"))) + ? trim(regexreplace(replace(lower(format("%s_%s", record.hostname, record.record_type)), "*", "wildcard"), "[^a-z0-9]+", "_"), "_") + : format("record_%s", trim(regexreplace(replace(lower(format("%s_%s", record.hostname, record.record_type)), "*", "wildcard"), "[^a-z0-9]+", "_"), "_")), record.id ) => record }