github.com/teknogeek/dnscontrol/v2@v2.10.1-0.20200227202244-ae299b55ba42/docs/_providers/azuredns.md (about) 1 --- 2 name: Azure DNS 3 layout: default 4 jsId: AZURE_DNS 5 --- 6 7 # Azure DNS Provider 8 9 You can specify the API credentials in the credentials json file: 10 11 {% highlight json %} 12 { 13 "azuredns_main":{ 14 "SubscriptionID": "AZURE_SUBSCRIPTION_ID", 15 "ResourceGroup": "AZURE_RESOURCE_GROUP", 16 "TenantID": "AZURE_TENANT_ID", 17 "ClientID": "AZURE_CLIENT_ID", 18 "ClientSecret": "AZURE_CLIENT_SECRET", 19 } 20 } 21 {% endhighlight %} 22 23 You can also use environment variables, but this is discouraged, unless your environment provides them already. 24 25 ``` 26 $ export AZURE_SUBSCRIPTION_ID=XXXXXXXXX 27 $ export AZURE_RESOURCE_GROUP=YYYYYYYYY 28 $ export AZURE_TENANT_ID=ZZZZZZZZ 29 $ export AZURE_CLIENT_ID=AAAAAAAAA 30 $ export AZURE_CLIENT_SECRET=BBBBBBBBB 31 ``` 32 33 {% highlight json %} 34 { 35 "azuredns_main":{ 36 "SubscriptionID": "$AZURE_SUBSCRIPTION_ID", 37 "ResourceGroup": "$AZURE_RESOURCE_GROUP", 38 "TenantID": "$AZURE_TENANT_ID", 39 "ClientID": "$AZURE_CLIENT_ID", 40 "ClientSecret": "$AZURE_CLIENT_SECRET", 41 } 42 } 43 {% endhighlight %} 44 45 ## Metadata 46 This provider does not recognize any special metadata fields unique to Azure DNS. 47 48 ## Usage 49 Example Javascript: 50 51 {% highlight js %} 52 var REG_NONE = NewRegistrar('none','NONE'); 53 var ADNS = NewDnsProvider('azuredns_main', 'AZURE_DNS'); 54 55 D('example.tld', REG_NONE, DnsProvider(ADNS), 56 A('test','1.2.3.4') 57 ); 58 {%endhighlight%} 59 60 ## Activation 61 DNSControl depends on a standard [Client credentials Authentication](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest) with permission to list, create and update hosted zones. 62 63 ## New domains 64 If a domain does not exist in your Azure account, DNSControl will *not* automatically add it with the `push` command. You can do that either manually via the control panel, or via the command `dnscontrol create-domains` command. 65 66