Last active
November 13, 2017 18:02
-
-
Save chris2fer/245622aee6b889fae3fa07be94acc30e to your computer and use it in GitHub Desktop.
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": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"virtualNetworkName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name for new virtual network" | |
} | |
}, | |
"addressPrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "Name for new virtual network" | |
} | |
}, | |
"subnet1Name": { | |
"type": "string", | |
"defaultValue": "Subnet1", | |
"metadata": { | |
"description": "Name for VM subnet in the new VNet" | |
} | |
}, | |
"subnet1Prefix": { | |
"type": "string", | |
"metadata": { | |
"description": "CIDR block for VM subnet" | |
} | |
} | |
}, | |
"variables": { | |
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2015-05-01-preview", | |
"type": "Microsoft.Network/virtualNetworks", | |
"name": "[parameters('virtualNetworkName')]", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"addressSpace": { | |
"addressPrefixes": [ | |
"[parameters('addressPrefix')]" | |
] | |
}, | |
"subnets": [ | |
{ | |
"name": "[parameters('subnet1Name')]", | |
"properties": { | |
"addressPrefix": "[parameters('subnet1Prefix')]" | |
} | |
}, | |
{ | |
"name": "[parameters('gatewaySubnet')]", | |
"properties": { | |
"addressPrefix": "[parameters('gatewaySubnetPrefix')]" | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"apiVersion": "2015-05-01-preview", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"name": "[parameters('gatewayPublicIPName')]", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"publicIPAllocationMethod": "Dynamic" | |
} | |
}, | |
{ | |
"apiVersion": "2015-05-01-preview", | |
"type": "Microsoft.Network/virtualNetworkGateways", | |
"name": "[parameters('gatewayName')]", | |
"location": "[resourceGroup().location]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/publicIPAddresses/', parameters('gatewayPublicIPName'))]", | |
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" | |
], | |
"properties": { | |
"ipConfigurations": [ | |
{ | |
"properties": { | |
"privateIPAllocationMethod": "Dynamic", | |
"subnet": { | |
"id": "[variables('gatewaySubnetRef')]" | |
}, | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses',parameters('gatewayPublicIPName'))]" | |
} | |
}, | |
"name": "vnetGatewayConfig" | |
} | |
], | |
"gatewayType": "Vpn", | |
"vpnType": "RouteBased", | |
"enableBgp": false | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment