-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpart2_connect_inbound.json
107 lines (105 loc) · 4.67 KB
/
part2_connect_inbound.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
96
97
98
99
100
101
102
103
104
105
106
107
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"comments": "This template is released under an as-is, best effort, and is community supported.",
"author": "Matt McLimans ([email protected])"
},
"parameters": {
"WANResourceGroup": {
"type": "string",
"defaultValue": "virtual-wan-rg",
"metadata": {
"description": "Name of the vWAN resource group."
}
},
"securityVnetName": {
"type": "string",
"metadata": {
"description": "Name of the existing security vNet to connect to the hub."
}
},
"HubName": {
"type": "string",
"defaultValue": "hub1",
"metadata": {
"description": "Name of an existing vWAN hub."
}
},
"HubAssociatedRouteTable": {
"type": "string",
"defaultValue": "defaultRouteTable",
"metadata": {
"description": "The existing vWAN hub route table to associate with the VNET connection."
}
},
"HubPropagatedRouteTable": {
"type": "String",
"defaultValue": "defaultRouteTable",
"metadata": {
"description": "The existing vWAN hub route table to propagate the VNET connection."
}
}
},
"variables": {
"global_apiVersion": "2020-06-01",
"global_resource_group": "[resourceGroup().name]",
"vnet_name": "[parameters('securityVnetName')]",
"wan_rg": "[parameters('WANResourceGroup')]",
"hub_name": "[parameters('HubName')]",
"hub_connection_name": "[concat(variables('vnet_name'),'-conn')]",
"hub_route_table_associated": "[resourceId(variables('wan_rg'),'Microsoft.Network/virtualHubs/hubRouteTables', parameters('HubName'), parameters('HubAssociatedRouteTable'))]",
"hub_route_table_propagated": "[resourceId(variables('wan_rg'),'Microsoft.Network/virtualHubs/hubRouteTables', parameters('HubName'), parameters('HubPropagatedRouteTable'))]"
},
"resources": [
{
"apiVersion": "[variables('global_apiVersion')]",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('wan_rg')]",
"name": "CREATE_HUB_CONNECTION",
"dependsOn": [],
"properties": {
"mode": "Incremental",
"parameters": {},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/virtualHubs/hubVirtualNetworkConnections",
"apiVersion": "[variables('global_apiVersion')]",
"name": "[concat(variables('hub_name'), '/', variables('hub_connection_name'))]",
"dependsOn": [],
"properties": {
"routingConfiguration": {
"associatedRouteTable": {
"id": "[variables('hub_route_table_associated')]"
},
"propagatedRouteTables": {
"labels": [],
"ids": [
{
"id": "[variables('hub_route_table_propagated')]"
}
]
},
"vnetRoutes": {
"staticRoutes": []
}
},
"remoteVirtualNetwork": {
"id": "[resourceId(variables('global_resource_group'), 'Microsoft.Network/virtualNetworks', variables('vnet_name'))]"
},
"allowHubToRemoteVnetTransit": true,
"allowRemoteVnetToUseHubVnetGateways": true,
"enableInternetSecurity": true
}
}
]
}
}
}
]
}