Setting up Azure for DNS credentials
Create an app registration and a client secret, and assign the DNS Zone Contributor role on the resource group that holds the zone.
- A public Azure DNS zone and a resource group that holds it. For the full list of requirements, see Azure DNS credentials.
- Permission in Microsoft Entra ID to create an app registration, and permission to assign roles on the resource group.
Complete these steps in the Azure portal, or use the Azure CLI commands at the end of this topic.
Azure now has an app registration, a client secret, and a role assignment on the resource group. You can enter these values when you add the DNS credential.
To do the same steps with the Azure CLI, run the following commands. Replace the placeholders with your values.
APP_ID=$(az ad app create --display-name <app-name> --sign-in-audience AzureADMyOrg --query appId -o tsv)
az ad sp create --id "$APP_ID"
# Prints the secret value once. Store it in a password manager.
az ad app credential reset --id "$APP_ID" --display-name ccf-external-dns --end-date <YYYY-MM-DD> --query password -o tsv
az role assignment create --assignee "$APP_ID" --role "DNS Zone Contributor" \
--scope /subscriptions/<subscription-id>/resourceGroups/<resource-group>
# Prints the tenant ID and subscription ID for the credential form
az account show --query "{tenantId:tenantId, subscriptionId:id}" -o tableNext, see Adding an Azure DNS credential.
