Reputation: 3896
I am looking for a way to create DNS CNAME entries in Azure DNS via Azure Resource Manager Templates but unable to find a way/the syntax for it.
In the samples project here: https://github.com/Azure/azure-quickstart-templates they only demo how to create a DNS zone but not the individual A/CNAME records.
Can someone please share the ARM template code on how to do that? Thanks.
Upvotes: 2
Views: 2329
Reputation: 72171
here's an individual cname record:
{
"name": "[concat('domain.com/cname_record_name)]",
"type": "Microsoft.Network/dnsZones/CNAME",
"apiVersion": "2017-09-01",
"properties": {
"TTL": 60,
"CNAMERecord": {
"cname": "what.it.targets"
}
}
}
domain.com - should be the name of the dns zone you are targeting. cname should be the value you point your cname at.
Upvotes: 3