Browse Source

add bearer token to removal

pull/5276/head
stbeldarborge 4 months ago
parent
commit
f0d486d1ff
No known key found for this signature in database GPG Key ID: E2B7D4D531A7A945
  1. 8
      dnsapi/dns_azure.sh

8
dnsapi/dns_azure.sh

@ -194,8 +194,12 @@ dns_azure_rm() {
fi
fi
accesstoken=$(_azure_getaccess_token "$AZUREDNS_MANAGEDIDENTITY" "$AZUREDNS_TENANTID" "$AZUREDNS_APPID" "$AZUREDNS_CLIENTSECRET")
if [ -z "$AZUREDNS_BEARERTOKEN" ]; then
accesstoken=$(_azure_getaccess_token "$AZUREDNS_MANAGEDIDENTITY" "$AZUREDNS_TENANTID" "$AZUREDNS_APPID" "$AZUREDNS_CLIENTSECRET")
else
accesstoken=$(echo "$AZUREDNS_BEARERTOKEN" | sed "s/Bearer //g")
fi
if ! _get_root "$fulldomain" "$AZUREDNS_SUBSCRIPTIONID" "$accesstoken"; then
_err "invalid domain"
return 1

Loading…
Cancel
Save