-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualNetworkPeerings.json
98 lines (98 loc) · 3.63 KB
/
virtualNetworkPeerings.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "2017.09.01.0",
"parameters": {
"Name": {
"type": "string",
"metadata": {
"description": "The name of the resource that is unique within a resource group. This name can be used to access the resource."
}
},
"AllowVirtualNetworkAccess": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space."
}
},
"AllowForwardedTraffic": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed."
}
},
"AllowGatewayTransit": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "If gateway links can be used in remote virtual networking to link to this virtual network."
}
},
"UseRemoteGateways": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway."
}
},
"RemoteVirtualNetworkId": {
"type": "string",
"metadata": {
"description": "The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview)."
}
},
"DependsOn": {
"type": "array",
"defaultValue": [],
"metadata": {
"description": "Pass dependencies"
}
}
},
"variables": {
"comment": {
"documentation": "https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtualnetworks/createorupdate#definitions_virtualnetworkpeering"
},
"virtualNetworkPeerings": {
"apiVersion": "2017-09-01",
"type": "virtualNetworkPeerings",
"name": "[parameters('Name')]",
"location": "[resourceGroup().location]",
"dependsOn": "[if(empty(parameters('DependsOn')),json('null'),parameters('DependsOn'))]",
"properties": {
"allowVirtualNetworkAccess": "[parameters('AllowVirtualNetworkAccess')]",
"allowForwardedTraffic": "[parameters('AllowForwardedTraffic')]",
"allowGatewayTransit": "[parameters('AllowGatewayTransit')]",
"useRemoteGateways": "[parameters('UseRemoteGateways')]",
"remoteVirtualNetwork": {
"id": "[parameters('RemoteVirtualNetworkId')]"
}
}
}
},
"resources": [
{
"apiVersion": "2017-09-01",
"type": "virtualNetworkPeerings",
"name": "[parameters('Name')]",
"location": "[resourceGroup().location]",
"dependsOn": "[if(empty(parameters('DependsOn')),json('null'),parameters('DependsOn'))]",
"properties": {
"allowVirtualNetworkAccess": "[parameters('AllowVirtualNetworkAccess')]",
"allowForwardedTraffic": "[parameters('AllowForwardedTraffic')]",
"allowGatewayTransit": "[parameters('AllowGatewayTransit')]",
"useRemoteGateways": "[parameters('UseRemoteGateways')]",
"remoteVirtualNetwork": {
"id": "[parameters('RemoteVirtualNetworkId')]"
}
}
}
],
"outputs": {
"virtualNetworkPeerings": {
"type": "object",
"value": "[variables('virtualNetworkPeerings')]"
}
}
}