From 75cb951bfca9d24867c95e0540b48dadd656964c Mon Sep 17 00:00:00 2001 From: Luke Mikluch Date: Thu, 15 Feb 2024 09:44:20 -0600 Subject: [PATCH] Use --value= for add-record command (Issue #836) Use '--value=' instead of '-v' to allow Azure CLI to process TXT record tokens that start with special characters (in particular, a dash character). Proposed fix for Issue #836. --- dns_scripts/dns_add_azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns_scripts/dns_add_azure b/dns_scripts/dns_add_azure index 3f0f666..f3812ec 100755 --- a/dns_scripts/dns_add_azure +++ b/dns_scripts/dns_add_azure @@ -37,4 +37,4 @@ recordset="_acme-challenge.${fulldomain/.$zone_id/}" # E.g. domain = *.sub.example.com the recordset is _acme-challenge.sub # domain = example.com the record set is _acme-challenge [[ "$recordset" == "_acme-challenge.$fulldomain" ]] && recordset="_acme-challenge" -az network dns record-set txt add-record -g "$AZURE_RESOURCE_GROUP" -z "$zone_id" -n "$recordset" -v "$token" +az network dns record-set txt add-record -g "$AZURE_RESOURCE_GROUP" -z "$zone_id" -n "$recordset" --value="$token"