104 строки
3.0 KiB
JSON
104 строки
3.0 KiB
JSON
{
|
|
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
|
"contentVersion": "1.0.0.0",
|
|
"apiProfile": "2018-03-01-hybrid",
|
|
"parameters": { },
|
|
"variables": {
|
|
"nicName": "myNic",
|
|
"publicIPAddressName": "myPubIP",
|
|
"vnetName": "myVNet",
|
|
"nsgName": "myNsg",
|
|
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
|
"addressPrefix": "10.0.0.0/24",
|
|
"subnetName": "Subnet-1",
|
|
"subnetPrefix": "10.0.0.0/24",
|
|
"publicIPAddressType": "Dynamic",
|
|
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('vnetName'))]",
|
|
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables ('subnetName'))]",
|
|
"numberOfInstances": 1
|
|
},
|
|
"resources": [
|
|
{
|
|
"name": "[variables('nsgName')]",
|
|
"type": "Microsoft.Network/networkSecurityGroups",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"securityRules": [
|
|
{
|
|
"name": "rule1",
|
|
"properties": {
|
|
"protocol": "*",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "*",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 101,
|
|
"direction": "Inbound"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "[variables('publicIPAddressName')]",
|
|
"type": "Microsoft.Network/publicIPAddresses",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"publicIPAllocationMethod": "[variables('publicIPAddressType')]"
|
|
}
|
|
},
|
|
{
|
|
"name": "[variables('vnetName')]",
|
|
"type": "Microsoft.Network/virtualNetworks",
|
|
"location": "[resourceGroup().location]",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]"
|
|
],
|
|
"properties": {
|
|
"addressSpace": {
|
|
"addressPrefixes": [
|
|
"[variables('addressPrefix')]"
|
|
]
|
|
},
|
|
"subnets": [
|
|
{
|
|
"name": "[variables('subnetName')]",
|
|
"properties": {
|
|
"addressPrefix": "[variables('subnetPrefix')]",
|
|
"networkSecurityGroup": {
|
|
"id": "[variables('nsgID')]"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "[concat(variables('nicName'), copyindex())]",
|
|
"type": "Microsoft.Network/networkInterfaces",
|
|
"location": "[resourceGroup().location]",
|
|
"copy": {
|
|
"name": "nicLoop",
|
|
"count": "[variables('numberOfInstances')]"
|
|
},
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]"
|
|
],
|
|
"properties": {
|
|
"ipConfigurations": [
|
|
{
|
|
"name": "ipconfig1",
|
|
"properties": {
|
|
"privateIPAllocationMethod": "Dynamic",
|
|
"subnet": {
|
|
"id": "[variables('subnetRef')]"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"outputs": { }
|
|
} |