forked from QualiSystems/Azure-POC-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfrastructure.json
More file actions
160 lines (157 loc) · 4.93 KB
/
infrastructure.json
File metadata and controls
160 lines (157 loc) · 4.93 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ManagementVnetCIDR": {
"defaultValue": "192.168.120.0/24",
"type": "string",
"metadata": {
"description": "The IP range (in CIDR notation) to be used for the Management VNet. Specify a class C CIDR (/24). Example: 192.168.120.0/24"
}
},
"ManagementVnetSubnetCIDR": {
"defaultValue": "192.168.120.16/28",
"type": "string",
"metadata": {
"description": "The IP range (in CIDR notation) of the subnet to be used by the Management VNet. This range must be included in the Management VNet�s range. This subnet is used by CloudShell components such as QualiX Server and TestShell Execution Server. Example: 192.168.120.16/28"
}
},
"MGMTVNetName": {
"type": "string",
"metadata": {
"description": "Name to use for the mamagement VNET"
}
},
"SandboxVNetName": {
"type": "string",
"metadata": {
"description": "Name to use for the sandbox VNET"
}
},
"StorageAccountName": {
"type": "string",
"metadata": {
"description": "Name to use for the storage account"
}
}
},
"variables": {
"vNet1": {
"peeringName": "vNet_mgmt-to-vNet_sndbx"
},
"vNet2": {
"peeringName": "vNet_sndbx-to-vNet_mgmt"
},
"location": "[resourceGroup().location]",
"storageAccountType": "Premium_LRS"
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('SandboxVNetName')]",
"apiVersion": "2016-06-01",
"location": "[variables('location')]",
"tags": {
"network_type": "sandbox"
},
"properties": {
"addressSpace": {
"addressPrefixes": [ "10.159.0.0/16" ]
},
"subnets": [
{
"name": "default",
"properties": {
"addressPrefix": "10.159.0.0/24"
}
}
]
},
"resources": [
{
"apiVersion": "2016-06-01",
"type": "virtualNetworkPeerings",
"name": "[variables('vNet2').peeringName]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/virtualNetworks/', parameters('SandboxVNetName'))]",
"[concat('Microsoft.Network/virtualNetworks/', parameters('MGMTVNetName'))]"
],
"comments": "This is the peering from vNet Sandbox to vNet Management",
"properties": {
"allowVirtualNetworkAccess": "true",
"allowForwardedTraffic": "false",
"allowGatewayTransit": "false",
"useRemoteGateways": "false",
"remoteVirtualNetwork": {
"id": "[resourceId('Microsoft.Network/virtualNetworks',parameters('MGMTVNetName'))]"
}
}
}
],
"dependsOn": []
},
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('MGMTVNetName')]",
"apiVersion": "2016-06-01",
"location": "[variables('location')]",
"tags": {
"network_type": "mgmt"
},
"properties": {
"addressSpace": {
"addressPrefixes": [ "[parameters('ManagementVnetCIDR')]" ]
},
"subnets": [
{
"name": "default",
"properties": {
"addressPrefix": "[parameters('ManagementVnetSubnetCIDR')]"
}
}
]
},
"resources": [
{
"apiVersion": "2016-06-01",
"type": "virtualNetworkPeerings",
"name": "[variables('vNet1').peeringName]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/virtualNetworks/', parameters('MGMTVNetName'))]",
"[concat('Microsoft.Network/virtualNetworks/', parameters('SandboxVNetName'))]"
],
"comments": "This is the peering from vNet Management to vNet Sandbox",
"properties": {
"allowVirtualNetworkAccess": "true",
"allowForwardedTraffic": "false",
"allowGatewayTransit": "false",
"useRemoteGateways": "false",
"remoteVirtualNetwork": {
"id": "[resourceId('Microsoft.Network/virtualNetworks',parameters('SandboxVNetName'))]"
}
}
}
],
"dependsOn": []
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('StorageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"sku": {
"name": "[variables('storageAccountType')]"
},
"kind": "Storage",
"properties": {}
}
],
"outputs": {
"vnetId" :{
"value" : "[resourceId('Microsoft.Network/virtualNetworks',parameters('MGMTVNetName'))]",
"type" : "string"
}
}
}