Skip to content

Latest commit

 

History

History
84 lines (74 loc) · 3.33 KB

virtual-networks-nrp-dns-include.md

File metadata and controls

84 lines (74 loc) · 3.33 KB

Azure DNS

Azure DNS is a hosting service for DNS domains, providing name resolution using Microsoft Azure infrastructure.

Property Description Sample Value
DNSzones Domain zone information to host DNS records of a particular domain /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com"

DNS record sets

DNS zones have a child object named record set. Record sets are a collection of host records by type for a DNS zone. Record types are A, AAAA, CNAME, MX, NS, SOA,SRV and TXT.

Property Description Sample value
A IPv4 record type /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/A/www
AAAA IPv6 record type /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/AAAA/hostrecord
CNAME canonical name record type 1 /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/CNAME/www
MX mail record type /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/MX/mail
NS name server record type /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/NS/
SOA Start of Authority record type 2 /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/SOA
SRV service record type /subscriptions/{guid}/.../providers/Microsoft.Network/dnszones/contoso.com/SRV

1 only allows one value per record set.

2 only allows one record type SOA per DNS zone.

Sample of DNS zone in Json format:

{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "newZoneName": {
      "type": "String",
      "metadata": {
          "description": "The name of the DNS zone to be created."
      }
    },
    "newRecordName": {
      "type": "String",
      "defaultValue": "www",
      "metadata": {
          "description": "The name of the DNS record to be created.  The name is relative to the zone, not the FQDN."
      }
    }
  },
  "resources": 
  [
    {
      "type": "microsoft.network/dnszones",
      "name": "[parameters('newZoneName')]",
      "apiVersion": "2015-05-04-preview",
      "location": "global",
      "properties": {
      }
    },
    {
      "type": "microsoft.network/dnszones/a",
      "name": "[concat(parameters('newZoneName'), concat('/', parameters('newRecordName')))]",
      "apiVersion": "2015-05-04-preview",
      "location": "global",
      "properties": 
      {
        "TTL": 3600,
        "ARecords": 
        [
            {
                "ipv4Address": "1.2.3.4"
            },
            {
                "ipv4Address": "1.2.3.5"
            }
        ]
      },
      "dependsOn": [
        "[concat('Microsoft.Network/dnszones/', parameters('newZoneName'))]"
      ]
    }
      ]
}

Additional resources

Read the REST API documentation for DNS zones for more information.

Read the REST API documentation for DNS record sets for more information.