Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created September 20, 2016 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/ad9f55b6e17d5c4ac675433cdbf2e0ff to your computer and use it in GitHub Desktop.
Save nivleshc/ad9f55b6e17d5c4ac675433cdbf2e0ff to your computer and use it in GitHub Desktop.
ARM Template section that shows how to update the DNS settings for a VM before it is added as a replica Domain Controller. The ip address of the first DC is added as the DNS on the virtual machine
{
"name": "UpdateDC02NIC",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('nicTemplateUri')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"nicName": {
"value": "[parameters('DC02NicName')]"
},
"ipConfigurations": {
"value": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress": "[parameters('DC02NicIPAddress')]",
"subnet": {
"id": "[variables('DC02SubnetRef')]"
}
}
}
]
},
"dnsServers": {
"value": [
"[parameters('DC01NicIPAddress')]"
]
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment