Skip to content

Instantly share code, notes, and snippets.

@rnkhouse
Last active April 13, 2017 19:54
Show Gist options
  • Save rnkhouse/f516087da69db8a01d5f508ec183df3a to your computer and use it in GitHub Desktop.
Save rnkhouse/f516087da69db8a01d5f508ec183df3a to your computer and use it in GitHub Desktop.
Create Virtual Network on Azure.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "String"
},
"location": {
"defaultValue": "eastus2",
"type": "String"
},
"addressPrefix": {
"defaultValue": "1.0.0.0/16",
"type": "String"
},
"subnetName": {
"defaultValue": "subnet-1",
"type": "String"
},
"subnetAddressPrefix": {
"defaultValue": "1.0.1.0/24",
"type": "String"
},
"subnet2Name": {
"defaultValue": "subnet-2",
"type": "String"
},
"subnet2AddressPrefix": {
"defaultValue": "1.0.2.0/24",
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('name')]",
"apiVersion": "2016-06-01",
"location": "[parameters('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('addressPrefix')]"
]
},
"subnets": [
{
"name": "[parameters('subnetName')]",
"properties": {
"addressPrefix": "[parameters('subnetAddressPrefix')]"
}
},
{
"name": "[parameters('subnet2Name')]",
"properties": {
"addressPrefix": "[parameters('subnet2AddressPrefix')]"
}
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment