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.

  1. In Microsoft Entra ID, click App registrations and then New registration. Create a single-tenant app registration.
    Write down the Application (client) ID and the Directory (tenant) ID.
  2. In the app registration, open Certificates & secrets and click New client secret.
    Select an expiry date and plan the rotation. To rotate the secret in Cloudera Cloud Factory, you delete the DNS credential and add it again.
  3. Copy the secret Value immediately.
    Azure shows the value only once.
  4. On the resource group that holds the zone, assign the DNS Zone Contributor role to the service principal of the app registration.
    The role assignment takes about a minute to become active.

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 table

Next, see Adding an Azure DNS credential.