dnscontrol/documentation/provider/azureprivatedns.md
Christopher Hicks ecbfa9b4a0
CHORE: remove underscores from filenames for consistency (#3909)
## Context

Filenames for providers are not consistent.
https://github.com/StackExchange/dnscontrol/issues/3584#issuecomment-3633894582

## Changes

Rename files:

```
R  documentation/provider/azure_dns.md -> documentation/provider/azuredns.md
R  documentation/provider/azure_private_dns.md -> documentation/provider/azureprivatedns.md
R  documentation/provider/bunny_dns.md -> documentation/provider/bunnydns.md
R  documentation/provider/gandi_v5.md -> documentation/provider/gandiv5.md
R  documentation/provider/hetzner_v2.md -> documentation/provider/hetznerv2.md
R  providers/gandiv5/gandi_v5Provider.go -> providers/gandiv5/gandiv5Provider.go
```

## Verify

- `go build` still works.
- docs generation still works for me locally.
- I see. the Azure docs in the test site for the docs again after
f5767f4

---------

Co-authored-by: Tom Limoncelli <6293917+tlimoncelli@users.noreply.github.com>
2025-12-15 11:51:33 -05:00

2.2 KiB

Configuration

This provider is for the Azure Private DNS Service. This provider can only manage Azure Private DNS zones and will not manage public Azure DNS zones. To use this provider, add an entry to creds.json with TYPE set to AZURE_PRIVATE_DNS along with the API credentials.

Example:

{% code title="creds.json" %}

{
  "azure_private_dns_main": {
    "TYPE": "AZURE_PRIVATE_DNS",
    "SubscriptionID": "AZURE_PRIVATE_SUBSCRIPTION_ID",
    "ResourceGroup": "AZURE_PRIVATE_RESOURCE_GROUP",
    "TenantID": "AZURE_PRIVATE_TENANT_ID",
    "ClientID": "AZURE_PRIVATE_CLIENT_ID",
    "ClientSecret": "AZURE_PRIVATE_CLIENT_SECRET"
  }
}

{% endcode %}

You can also use environment variables:

export AZURE_SUBSCRIPTION_ID=XXXXXXXXX
export AZURE_RESOURCE_GROUP=YYYYYYYYY
export AZURE_TENANT_ID=ZZZZZZZZ
export AZURE_CLIENT_ID=AAAAAAAAA
export AZURE_CLIENT_SECRET=BBBBBBBBB

{% code title="creds.json" %}

{
  "azure_private_dns_main": {
    "TYPE": "AZURE_PRIVATE_DNS",
    "SubscriptionID": "$AZURE_PRIVATE_SUBSCRIPTION_ID",
    "ResourceGroup": "$AZURE_PRIVATE_RESOURCE_GROUP",
    "ClientID": "$AZURE_PRIVATE_CLIENT_ID",
    "TenantID": "$AZURE_PRIVATE_TENANT_ID",
    "ClientSecret": "$AZURE_PRIVATE_CLIENT_SECRET"
  }
}

{% endcode %}

Metadata

This provider does not recognize any special metadata fields unique to Azure Private DNS.

Usage

An example configuration:

{% code title="dnsconfig.js" %}

var REG_NONE = NewRegistrar("none");
var DSP_AZURE_PRIVATE_MAIN = NewDnsProvider("azure_private_dns_main");

D("example.com", REG_NONE, DnsProvider(DSP_AZURE_PRIVATE_MAIN),
    A("test", "1.2.3.4"),
);

{% endcode %}

Activation

DNSControl depends on a standard Client credentials Authentication with permission to list, create and update private zones.

New domains

If a domain does not exist in your Azure account, DNSControl will not automatically add it with the push command. You can do that manually via the control panel.

Caveats

The ResourceGroup is case sensitive.