Skip to content

Commit b8704e1

Browse files
radhikagupta5vikasnav
authored andcommitted
Create a template to showcase DNS zones and record sets (#213)
* Template for VMMS Template: Windows: Deploy a VM Scale Set of Windows VMs with a custom script extension (201-vmss-custom-script-windows) * Create a template to showcase DNS zones and record sets
1 parent b3736dc commit b8704e1

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

101-azure-dns-new-zone/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Azure DNS new zone
2+
3+
This is a starter template that shows how to create a DNS zone and some records using Azure Stack DNS. One thing to note is that the location of these resources is region agnostic in Azure Stack so we keep the location as 'global'.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"newZoneName": {
6+
"type": "string",
7+
"defaultValue": "[concat(uniqueString(resourceGroup().id), '.azurestackquickstart.org')]",
8+
"metadata": {
9+
"description": "The name of the DNS zone to be created. Must have at least 2 segements, e.g. hostname.org"
10+
}
11+
},
12+
"newRecordName": {
13+
"type": "string",
14+
"defaultValue": "www",
15+
"metadata": {
16+
"description": "The name of the DNS record to be created. The name is relative to the zone, not the FQDN."
17+
}
18+
}
19+
},
20+
"resources": [
21+
{
22+
"type": "Microsoft.Network/dnszones",
23+
"name": "[parameters('newZoneName')]",
24+
"apiVersion": "2016-04-01",
25+
"location": "global",
26+
"properties": { }
27+
},
28+
{
29+
"type": "Microsoft.Network/dnszones/a",
30+
"name": "[concat(parameters('newZoneName'), '/', parameters('newRecordName'))]",
31+
"apiVersion": "2016-04-01",
32+
"location": "global",
33+
"dependsOn": [
34+
"[parameters('newZoneName')]"
35+
],
36+
"properties": {
37+
"TTL": 3600,
38+
"ARecords": [
39+
{
40+
"ipv4Address": "1.2.3.4"
41+
},
42+
{
43+
"ipv4Address": "1.2.3.5"
44+
}
45+
]
46+
}
47+
}
48+
],
49+
"outputs": {
50+
"nameServers": {
51+
"type": "array",
52+
"value": "[reference(parameters('newZoneName')).nameServers]"
53+
}
54+
}
55+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
}
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"itemDisplayName": "Azure Stack DNS domain hosting example",
3+
"description": "This template shows how to create a DNS zone within Azure Stack DNS and how to add some record sets to it.",
4+
"summary": "This template creates a DNS zone within the Azure Stack DNS resource provider. It then creates a RecordSet containing two DNS A records within that zone. This template was originally taken from Azure Github repo and modified for Azure Stack.",
5+
"githubUsername": "GarethBradshawMSFT",
6+
"dateUpdated": "2017-03-22"
7+
}

0 commit comments

Comments
 (0)