Created
January 26, 2017 13:19
-
-
Save marrobi/5e6b8c62f8d81ab80202ba53c8031ba2 to your computer and use it in GitHub Desktop.
VNet, VMNic, VMNicPIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"VMNicName": { | |
"type": "string", | |
"minLength": 1 | |
}, | |
"VMNicPIPDnsName": { | |
"type": "string", | |
"minLength": 1 | |
} | |
}, | |
"variables": { | |
"VNetPrefix": "10.0.0.0/16", | |
"VNetSubnet1Name": "Subnet-1", | |
"VNetSubnet1Prefix": "10.0.0.0/24", | |
"VMNicVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'VNet')]", | |
"VMNicSubnetRef": "[concat(variables('VMNicVnetID'), '/subnets/', variables('VNetSubnet1Name'))]", | |
"VMNicPIPName": "VMNicPIP" | |
}, | |
"resources": [ | |
{ | |
"name": "VNet", | |
"type": "Microsoft.Network/virtualNetworks", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-03-30", | |
"dependsOn": [ ], | |
"tags": { | |
"displayName": "VNet" | |
}, | |
"properties": { | |
"addressSpace": { | |
"addressPrefixes": [ | |
"[variables('VNetPrefix')]" | |
] | |
}, | |
"subnets": [ | |
{ | |
"name": "[variables('VNetSubnet1Name')]", | |
"properties": { | |
"addressPrefix": "[variables('VNetSubnet1Prefix')]" | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "[parameters('VMNicName')]", | |
"type": "Microsoft.Network/networkInterfaces", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-03-30", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/virtualNetworks', 'VNet')]", | |
"[resourceId('Microsoft.Network/publicIPAddresses', variables('VMNicPIPName'))]" | |
], | |
"tags": { | |
"displayName": "VMNic" | |
}, | |
"properties": { | |
"ipConfigurations": [ | |
{ | |
"name": "ipconfig1", | |
"properties": { | |
"privateIPAllocationMethod": "Dynamic", | |
"subnet": { | |
"id": "[variables('VMNicSubnetRef')]" | |
}, | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('VMNicPIPName'))]" | |
} | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "[variables('VMNicPIPName')]", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"location": "[resourceGroup().location]", | |
"apiVersion": "2016-03-30", | |
"dependsOn": [ ], | |
"tags": { | |
"displayName": "VMNicPIP" | |
}, | |
"properties": { | |
"publicIPAllocationMethod": "Dynamic", | |
"dnsSettings": { | |
"domainNameLabel": "[parameters('VMNicPIPDnsName')]" | |
} | |
} | |
} | |
], | |
"outputs": { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment