194 строки
5.4 KiB
JSON
194 строки
5.4 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"spLBName": {
|
|
"type": "string"
|
|
},
|
|
"adlbName": {
|
|
"type": "string"
|
|
},
|
|
"sqllbName": {
|
|
"type": "string"
|
|
},
|
|
"LBFE": {
|
|
"type": "string"
|
|
},
|
|
"LBBE": {
|
|
"type": "string"
|
|
},
|
|
"RDPNAT": {
|
|
"type": "string"
|
|
},
|
|
"spWebNAT": {
|
|
"type": "string"
|
|
},
|
|
"spCANAT": {
|
|
"type": "string"
|
|
},
|
|
"spPublicIPResourceId": {
|
|
"type": "string"
|
|
},
|
|
"adPublicIpResourceId": {
|
|
"type": "string"
|
|
},
|
|
"sqlPublicIpResourceId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"apiVersion": "2015-06-15",
|
|
"name": "[parameters('spLBName')]",
|
|
"type": "Microsoft.Network/loadBalancers",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"frontendIPConfigurations": [
|
|
{
|
|
"name": "[parameters('LBFE')]",
|
|
"properties": {
|
|
"publicIPAddress": {
|
|
"id": "[parameters('spPublicIPResourceId')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"backendAddressPools": [
|
|
{
|
|
"name": "[parameters('LBBE')]"
|
|
}
|
|
],
|
|
"inboundNatRules": [
|
|
{
|
|
"name": "[parameters('RDPNAT')]",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceid(resourceGroup().name,'Microsoft.Network/loadBalancers',parameters('spLBName')), '/frontendIPConfigurations/',parameters('LBFE'))]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 3389,
|
|
"backendPort": 3389,
|
|
"enableFloatingIP": false
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('spWebNAT')]",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceid(resourceGroup().name,'Microsoft.Network/loadBalancers',parameters('spLBName')), '/frontendIPConfigurations/',parameters('LBFE'))]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 80,
|
|
"backendPort": 80,
|
|
"enableFloatingIP": false
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('spCANAT')]",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceid(resourceGroup().name,'Microsoft.Network/loadBalancers',parameters('spLBName')), '/frontendIPConfigurations/',parameters('LBFE'))]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 8080,
|
|
"backendPort": 8080,
|
|
"enableFloatingIP": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "2015-06-15",
|
|
"name": "[parameters('adlbName')]",
|
|
"type": "Microsoft.Network/loadBalancers",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"frontendIPConfigurations": [
|
|
{
|
|
"name": "[parameters('LBFE')]",
|
|
"properties": {
|
|
"publicIPAddress": {
|
|
"id": "[parameters('adPublicIpResourceId')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"backendAddressPools": [
|
|
{
|
|
"name": "[parameters('LBBE')]"
|
|
}
|
|
],
|
|
"inboundNatRules": [
|
|
{
|
|
"name": "[parameters('RDPNAT')]",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceid(resourceGroup().name,'Microsoft.Network/loadBalancers',parameters('adlbName')), '/frontendIPConfigurations/',parameters('LBFE'))]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 3389,
|
|
"backendPort": 3389,
|
|
"enableFloatingIP": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "2015-06-15",
|
|
"name": "[parameters('sqllbName')]",
|
|
"type": "Microsoft.Network/loadBalancers",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"frontendIPConfigurations": [
|
|
{
|
|
"name": "[parameters('LBFE')]",
|
|
"properties": {
|
|
"publicIPAddress": {
|
|
"id": "[parameters('sqlPublicIpResourceId')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"backendAddressPools": [
|
|
{
|
|
"name": "[parameters('LBBE')]"
|
|
}
|
|
],
|
|
"inboundNatRules": [
|
|
{
|
|
"name": "[parameters('RDPNAT')]",
|
|
"properties": {
|
|
"frontendIPConfiguration": {
|
|
"id": "[concat(resourceid(resourceGroup().name,'Microsoft.Network/loadBalancers',parameters('sqllbName')), '/frontendIPConfigurations/',parameters('LBFE'))]"
|
|
},
|
|
"protocol": "tcp",
|
|
"frontendPort": 3389,
|
|
"backendPort": 3389,
|
|
"enableFloatingIP": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"outputs": {
|
|
"splbID": {
|
|
"value": "[resourceId('Microsoft.Network/loadBalancers',parameters('spLBName'))]",
|
|
"type": "string"
|
|
},
|
|
"sqllbID": {
|
|
"value": "[resourceId('Microsoft.Network/loadBalancers',parameters('sqlLBName'))]",
|
|
"type": "string"
|
|
},
|
|
"adlbID": {
|
|
"value": "[resourceId('Microsoft.Network/loadBalancers',parameters('adLBName'))]",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|