Skip to content

Instantly share code, notes, and snippets.

@rnkhouse
Last active April 13, 2017 22:23
Show Gist options
  • Save rnkhouse/455bf76f46f26d97b96391ad95e58d22 to your computer and use it in GitHub Desktop.
Save rnkhouse/455bf76f46f26d97b96391ad95e58d22 to your computer and use it in GitHub Desktop.
Create External Loadbalancer for Subnet
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"pipName": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2016-03-30",
"name": "[parameters('name')]",
"type": "Microsoft.Network/loadBalancers",
"location": "[parameters('location')]",
"dependsOn": [],
"properties": {
"frontendIPConfigurations": [
{
"name": "LoadBalancerFrontEnd",
"properties": {
"publicIPAddress": {
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', parameters('pipName'))]"
}
}
}
],
"backendAddressPools": [
{
"name": "BackendPool1"
}
],
"probes": [
{
"name": "tcpProbe",
"properties": {
"protocol": "tcp",
"port": 80,
"intervalInSeconds": 5,
"numberOfProbes": 2
}
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment