Skip to content

Instantly share code, notes, and snippets.

@raykao
Last active February 12, 2017 01:57
Show Gist options
  • Save raykao/528f10ad393f9cc4dcbe22335ab807c5 to your computer and use it in GitHub Desktop.
Save raykao/528f10ad393f9cc4dcbe22335ab807c5 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2016-09-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"deploymentPrefix": {
"type": "string"
},
"indexCount": {
"type": "int"
},
"subnetId": {
"type": "string"
},
"nsgID": {
"type": "string"
},
"ipAddressArray": {
"type": "array",
"defaultValue": []
}
},
"variables": {
"interfaceName": "[concat(parameters('deploymentPrefix'), '-nic-', padLeft(parameters('indexCount'),3,'0'))]",
"location": "[resourceGroup().location]"
},
"resources": [
{
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('interfaceName')]",
"apiVersion": "2016-09-01",
"location": "[variables('location')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"subnet": {
"id": "[parameters('subnetId')]"
},
"privateIPAllocationMethod": "dynamic"
}
}
],
"networkSecurityGroup": {
"id": "[parameters('nsgID')]"
}
}
}
],
"outputs": {
"ipaddresses": {
"type" : "array",
"value": "[concat(parameters('ipAddressArray'), '1')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment