-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualNetworkGateway.json
95 lines (95 loc) · 3.33 KB
/
virtualNetworkGateway.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "string"
},
"gatewayType": {
"type": "string",
"defaultValue": "Vpn",
"allowedValues": [
"Vpn",
"ExpressRoute"
]
},
"vpnType": {
"type": "string",
"defaultValue": "RouteBased",
"allowedValues": [
"RouteBased",
"PolicyBased"
]
},
"existingVirtualNetworkName": {
"type": "string"
},
"newSubnetName": {
"type": "string"
},
"subnetAddressPrefix": {
"type": "string"
},
"newPublicIpAddressName": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2017-06-01",
"name": "[parameters('name')]",
"type": "Microsoft.Network/virtualNetworkGateways",
"location": "[parameters('location')]",
"dependsOn": [
"Microsoft.Network/virtualNetworks/virtualNetwork/subnets/GatewaySubnet",
"[concat('Microsoft.Network/publicIPAddresses/', parameters('newPublicIpAddressName'))]"
],
"properties": {
"gatewayType": "[parameters('gatewayType')]",
"ipConfigurations": [
{
"name": "default",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('virtualNetwork', 'Microsoft.Network/virtualNetworks/subnets', parameters('existingVirtualNetworkName'), parameters('newSubnetName'))]"
},
"publicIpAddress": {
"id": "[resourceId('virtualNetwork', 'Microsoft.Network/publicIPAddresses', parameters('newPublicIpAddressName'))]"
}
}
}
],
"vpnType": "[parameters('vpnType')]",
"sku": {
"name": "[parameters('sku')]",
"tier": "[parameters('sku')]"
}
}
},
{
"apiVersion": "2017-08-01",
"type": "Microsoft.Network/virtualNetworks/subnets",
"name": "[concat(parameters('existingVirtualNetworkName'), '/', parameters('newSubnetName'))]",
"location": "[parameters('location')]",
"properties": {
"addressPrefix": "[parameters('subnetAddressPrefix')]"
}
},
{
"apiVersion": "2017-08-01",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[parameters('newPublicIpAddressName')]",
"location": "[parameters('location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
}
]
}