Files
sql-server-samples/samples/manage/azure-sql-db-managed-instance/attach-vpn-gateway/azuredeploy.json
T
2018-08-24 03:21:16 +02:00

128 lines
5.1 KiB
JSON

{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.1",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Enter location. If you leave this field blank resource group location would be used."
}
},
"virtualNetworkName": {
"type": "string",
"metadata": {
"description": "Enter virtual network name. If you leave this field blank name will be created by the template."
}
},
"gatewaySubnetPrefix": {
"type": "string",
"metadata": {
"description": "The prefix for the GatewaySubnet where the VirtualNetworkGateway will be deployed. This must be at least /29."
}
},
"vpnClientAddressPoolPrefix": {
"type": "string",
"metadata": {
"description": "The IP address range from which VPN clients will receive an IP address when connected. Range specified must not overlap with on-premise network."
}
},
"publicRootCertData": {
"type": "string",
"metadata": {
"description": "Client root certificate data used to authenticate VPN clients."
}
}
},
"variables": {
"gatewayPublicIpAddressName": "[concat('GatewayIP', substring(uniqueString(resourceGroup().id),0,3))]",
"gatewayName": "[concat('Gateway', substring(uniqueString(resourceGroup().id),0,3))]",
"gatewaySku": "Basic",
"gatewaySubnetName": "GatewaySubnet",
"clientRootCertName": "RootCert"
},
"resources": [
{
"name": "[parameters('virtualNetworkName')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2018-02-01",
"dependsOn": [
"[variables('routeTableName')]"
],
"location": "[parameters('location')]",
"properties": {
"mode": "Incremental",
"addressSpace": {
"addressPrefixes": [
"[parameters('gatewaySubnetPrefix')]"
]
},
"subnets": [
{
"name": "[variables('gatewaySubnetName')]",
"properties": {
"addressPrefix": "[parameters('gatewaySubnetPrefix')]"
}
}
]
}
},
{
"apiVersion": "2017-10-01",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('gatewayPublicIpAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
},
{
"apiVersion": "2017-10-01",
"type": "Microsoft.Network/virtualNetworkGateways",
"name": "[variables('gatewayName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('gatewayPublicIpAddressName'))]",
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]"
],
"properties": {
"ipConfigurations": [
{
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), variables('gatewaySubnetName'))]"
},
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('gatewayPublicIpAddressName'))]"
}
},
"name": "vnetGatewayConfig"
}
],
"sku": {
"name": "[variables('gatewaySku')]",
"tier": "[variables('gatewaySku')]"
},
"gatewayType": "Vpn",
"vpnType": "RouteBased",
"enableBgp": "false",
"vpnClientConfiguration": {
"vpnClientAddressPool": {
"addressPrefixes": [
"[parameters('vpnClientAddressPoolPrefix')]"
]
},
"vpnClientRootCertificates": [
{
"name": "[variables('clientRootCertName')]",
"properties": {
"PublicCertData": "[parameters('publicRootCertData')]"
}
}
]
}
}
}
]
}