Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM Templates for Express Route High Availability #14141

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"circuit1Location": {
"type": "string"
},
"circuit1Name": {
"type": "string"
},
"circuit1SkuTier": {
"type": "string"
},
"circuit1SkuFamily": {
"type": "string"
},
"circuit1BandwidthInMbps": {
"defaultValue": 1000,
"type": "int"
},
"circuit1ProviderName": {
"defaultValue": "",
"type": "string"
},
"circuit1PeeringLocation": {
"defaultValue": "",
"type": "string"
},
"circuit1BandwidthInGbps": {
"defaultValue": 1,
"type": "int"
},
"circuit1DirectId": {
"defaultValue": "",
"type": "string"
},
"circuit1DirectEnableRateLimiting": {
"defaultValue": false,
"type": "bool"
},
"circuit1Tags": {
"type": "object",
"defaultValue": {}
},
"circuit2Location": {
"type": "string"
},
"circuit2Name": {
"type": "string"
},
"circuit2SkuTier": {
"type": "string"
},
"circuit2SkuFamily": {
"type": "string"
},
"circuit2BandwidthInMbps": {
"defaultValue": 1000,
"type": "int"
},
"circuit2ProviderName": {
"defaultValue": "",
"type": "string"
},
"circuit2PeeringLocation": {
"defaultValue": "",
"type": "string"
},
"circuit2BandwidthInGbps": {
"defaultValue": 1,
"type": "int"
},
"circuit2DirectId": {
"defaultValue": "",
"type": "string"
},
"circuit2DirectEnableRateLimiting": {
"defaultValue": false,
"type": "bool"
},
"circuit2Tags": {
"type": "object",
"defaultValue": {}
}
},
"resources": [
{
"type": "Microsoft.Network/expressRouteCircuits",
"apiVersion": "2023-06-01",
"name": "[parameters('circuit1Name')]",
"location": "[parameters('circuit1Location')]",
"sku": {
"name": "[concat(parameters('circuit1SkuTier'),'_', parameters('circuit1SkuFamily'))]",
"tier": "[parameters('circuit1SkuTier')]",
"family": "[parameters('circuit1SkuFamily')]"
},
"properties": {
"expressRoutePort": {
"id": "[parameters('circuit1DirectId')]"
},
"enableDirectPortRateLimit": "[parameters('circuit1DirectEnableRateLimiting')]",
"bandwidthInGbps": "[parameters('circuit1BandwidthInGbps')]"
},
"tags": "[parameters('circuit1Tags')]",
"condition": "[not(empty(parameters('circuit1DirectId')))]"
},
{
"type": "Microsoft.Network/expressRouteCircuits",
"apiVersion": "2023-06-01",
"name": "[parameters('circuit1Name')]",
"location": "[parameters('circuit1Location')]",
"sku": {
"name": "[concat(parameters('circuit1SkuTier'),'_', parameters('circuit1SkuFamily'))]",
"tier": "[parameters('circuit1SkuTier')]",
"family": "[parameters('circuit1SkuFamily')]"
},
"properties": {
"serviceProviderProperties": {
"serviceProviderName": "[parameters('circuit1ProviderName')]",
"peeringLocation": "[parameters('circuit1PeeringLocation')]",
"bandwidthInMbps": "[parameters('circuit1BandwidthInMbps')]"
}
},
"tags": "[parameters('circuit1Tags')]",
"condition": "[empty(parameters('circuit1DirectId'))]"
},
{
"type": "Microsoft.Network/expressRouteCircuits",
"apiVersion": "2023-06-01",
"name": "[parameters('circuit2Name')]",
"location": "[parameters('circuit2Location')]",
"sku": {
"name": "[concat(parameters('circuit2SkuTier'),'_', parameters('circuit2SkuFamily'))]",
"tier": "[parameters('circuit2SkuTier')]",
"family": "[parameters('circuit2SkuFamily')]"
},
"properties": {
"expressRoutePort": {
"id": "[parameters('circuit2DirectId')]"
},
"enableDirectPortRateLimit": "[parameters('circuit2DirectEnableRateLimiting')]",
"bandwidthInGbps": "[parameters('circuit2BandwidthInGbps')]"
},
"tags": "[parameters('circuit2Tags')]",
"condition": "[not(empty(parameters('circuit2DirectId')))]"
},
{
"type": "Microsoft.Network/expressRouteCircuits",
"apiVersion": "2023-06-01",
"name": "[parameters('circuit2Name')]",
"location": "[parameters('circuit2Location')]",
"sku": {
"name": "[concat(parameters('circuit2SkuTier'),'_', parameters('circuit2SkuFamily'))]",
"tier": "[parameters('circuit2SkuTier')]",
"family": "[parameters('circuit2SkuFamily')]"
},
"properties": {
"serviceProviderProperties": {
"serviceProviderName": "[parameters('circuit2ProviderName')]",
"peeringLocation": "[parameters('circuit2PeeringLocation')]",
"bandwidthInMbps": "[parameters('circuit2BandwidthInMbps')]"
}
},
"tags": "[parameters('circuit2Tags')]",
"condition": "[empty(parameters('circuit2DirectId'))]"
}
]
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"virtualNetworkGatewayId1": {
"type": "string"
},
"connectionName1": {
"type": "string"
},
"routingWeight1": {
"type": "int"
},
"expressRouteGatewayBypass1": {
"type": "bool"
},
"expressRouteId1": {
"type": "string"
},
"connection1Tags": {
"type": "object",
"defaultValue": {}
},
"connectionName2": {
"type": "string"
},
"routingWeight2": {
"type": "int"
},
"expressRouteGatewayBypass2": {
"type": "bool"
},
"expressRouteId2": {
"type": "string"
},
"connection2Tags": {
"type": "object",
"defaultValue": {}
}
},
"resources": [
{
"name": "[parameters('connectionName1')]",
"type": "Microsoft.Network/connections",
"apiVersion": "2023-09-01",
"location": "[parameters('location')]",
"tags": "[parameters('connection1Tags')]",
"dependsOn": [],
"properties": {
"connectionType": "ExpressRoute",
"virtualNetworkGateway1": {
"id": "[parameters('virtualNetworkGatewayId1')]"
},
"routingWeight": "[parameters('routingWeight1')]",
"expressRouteGatewayBypass": "[parameters('expressRouteGatewayBypass1')]",
"peer": {
"id": "[parameters('expressRouteId1')]"
}
}
},
{
"name": "[parameters('connectionName2')]",
"type": "Microsoft.Network/connections",
"apiVersion": "2023-09-01",
"location": "[parameters('location')]",
"tags": "[parameters('connection2Tags')]",
"dependsOn": [
"[resourceId('Microsoft.Network/connections', parameters('connectionName1'))]"
],
"properties": {
"connectionType": "ExpressRoute",
"virtualNetworkGateway1": {
"id": "[parameters('virtualNetworkGatewayId1')]"
},
"routingWeight": "[parameters('routingWeight2')]",
"expressRouteGatewayBypass": "[parameters('expressRouteGatewayBypass2')]",
"peer": {
"id": "[parameters('expressRouteId2')]"
}
}
}
]
}
69 changes: 69 additions & 0 deletions application-workloads/expressroute/highAvailabilitySetup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ARM template usage to create 2 circuits:

# parameters to create 2 circuits on provider
$parameters = @{
# circuit 1 parameters:
circuit1Location = "eastus"
circuit1Name = "circuit1"
circuit1SkuTier = "Standard"
circuit1SkuFamily = "MeteredData"
circuit1BandwidthInMbps = 1000
circuit1ProviderName = "AT&T Netbond"
circuit1PeeringLocation = "Amsterdam"
# circuit 2 parameters:
circuit2Location = "eastus"
circuit2Name = "circuit2"
circuit2SkuTier = "Standard"
circuit2SkuFamily = "MeteredData"
circuit2BandwidthInMbps = 2000
circuit2ProviderName = "AT&T Netbond"
circuit2PeeringLocation = "Amsterdam"
}

# parameters to create 2 circuits on direct ports
$parameters = @{
# circuit 1 parameters:
circuit1Location = "eastus"
circuit1Name = "circuit1"
circuit1SkuTier = "Standard"
circuit1SkuFamily = "MeteredData"
circuit1DirectId = "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/expressRoutePorts/<portName>"
circuit1BandwidthInGbps = 1
circuit1DirectEnableRateLimiting = $true
# circuit 2 parameters:
circuit2Location = "eastus"
circuit2Name = "circuit2"
circuit2SkuTier = "Standard"
circuit2SkuFamily = "MeteredData"
circuit2DirectId = "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/expressRoutePorts/<portName2>"
circuit2BandwidthInGbps = 1
circuit2DirectEnableRateLimiting = $true
}

New-AzResourceGroupDeployment -Name "circuitdeployment" `
-ResourceGroupName "<rgName>" `
-TemplateFile .\NewAzHighAvailabilityExpressRouteCircuitsARMTemplate.json `
-TemplateParameterObject $parameters

# Usage of arm template to deploy 2 connections
$parameters = @{
# Gateway parameters:
location = "francecentral"
virtualNetworkGatewayId1 = "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/virtualNetworkGateways/erVng_migrated"
# connection 1 parameters:
connectionName1 = "connection1"
routingWeight1 = 10
expressRouteGatewayBypass1 = $false
expressRouteId1 = "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/expressRouteCircuits/providercircuit1"
# connection 2 parameters:
connectionName2 = "connection2"
routingWeight2 = 20
expressRouteGatewayBypass2 = $false
expressRouteId2 = "/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/expressRouteCircuits/providercircuit2"
}

$resourceGroupName = "<rgName>"
New-AzResourceGroupDeployment -Name "connectiondeployment" `
-ResourceGroupName "<rgName>" `
-TemplateFile .\NewHighAvailabilityVirtualNetworkGatewayConnectionsARMTemplate.json `
-TemplateParameterObject $parameters
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
"itemDisplayName": "ExpressRoute high Availability ARM Templates",
"description": "ARM templates to deploy 2 ExpressRoute circuits and 2 connections for resilient setups.",
"summary": "ARM templates for deploying a set of circuits and connections to be set up as high available/zone redundant, in order to achieve resiliency.",
"githubUsername": "nimaller",
"dateUpdated": "2024-09-26",
"type": "QuickStart"
}
Loading