Skip to content

Commit

Permalink
Create a template to showcase DNS zones and record sets (#213)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
radhikagupta5 authored and vikasnav committed Mar 23, 2017
1 parent b3736dc commit b8704e1
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 101-azure-dns-new-zone/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Azure DNS new zone

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'.
55 changes: 55 additions & 0 deletions 101-azure-dns-new-zone/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"newZoneName": {
"type": "string",
"defaultValue": "[concat(uniqueString(resourceGroup().id), '.azurestackquickstart.org')]",
"metadata": {
"description": "The name of the DNS zone to be created. Must have at least 2 segements, e.g. hostname.org"
}
},
"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": "2016-04-01",
"location": "global",
"properties": { }
},
{
"type": "Microsoft.Network/dnszones/a",
"name": "[concat(parameters('newZoneName'), '/', parameters('newRecordName'))]",
"apiVersion": "2016-04-01",
"location": "global",
"dependsOn": [
"[parameters('newZoneName')]"
],
"properties": {
"TTL": 3600,
"ARecords": [
{
"ipv4Address": "1.2.3.4"
},
{
"ipv4Address": "1.2.3.5"
}
]
}
}
],
"outputs": {
"nameServers": {
"type": "array",
"value": "[reference(parameters('newZoneName')).nameServers]"
}
}
}
6 changes: 6 additions & 0 deletions 101-azure-dns-new-zone/azuredeploy.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
}
}
7 changes: 7 additions & 0 deletions 101-azure-dns-new-zone/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"itemDisplayName": "Azure Stack DNS domain hosting example",
"description": "This template shows how to create a DNS zone within Azure Stack DNS and how to add some record sets to it.",
"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.",
"githubUsername": "GarethBradshawMSFT",
"dateUpdated": "2017-03-22"
}

0 comments on commit b8704e1

Please sign in to comment.