-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcomplete-asev2-deployment-no-vm.json
240 lines (240 loc) · 6.93 KB
/
complete-asev2-deployment-no-vm.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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"VNET Name": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name your VNET"
}
},
"ASE Subnet Name": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name the subnet where the ASE will be deployed"
}
},
"ASE Name": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name of your App Service Environment. It will be important for the ASE domain (asename.appserviceenvironment.net)"
}
},
"App Service Plan Name": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name of your App Service plan that will be deployed to the ASE"
}
},
"App Service Plan Tier": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Defines the pricing tier: 1 = Isolated 1 (I1), 2 = Isolated 2 (I2), 3 = Isolated 3 (I3)."
},
"allowedValues": [
"1",
"2",
"3"
],
"defaultValue": "1"
},
"App Service Capacity": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Shows how many instances of this App Service plan you want. Scale out workers"
}
},
"Wep App Name": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Name of your Web App that will be created under your App Service Plan in the ASE"
}
}
},
"variables": {
"VNET Address space": "10.0.0.0/16",
"ASE Subnet Address range": "10.0.0.0/24",
"VMVnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('VNET Name'))]",
"ASESubnetRef": "[concat(variables('VMVnetID'), '/subnets/', parameters('ASE Subnet Name'))]",
"ilbMode": "3",
"newZoneName": "[concat(parameters('ASE Name'), '.appserviceenvironment.net')]",
"newRecordName": "*",
"newRecordName2": "*.scm",
"newRecordName3": "@",
"vnetlinkname": "vnetlink"
},
"resources": [
{
"name": "[parameters('VNET Name')]",
"type": "Microsoft.Network/virtualNetworks",
"location": "[resourceGroup().location]",
"apiVersion": "2016-03-30",
"dependsOn": [],
"tags": {
"displayName": "ILB ASE LAB"
},
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('VNET Address space')]"
]
},
"subnets": [
{
"name": "[parameters('ASE Subnet Name')]",
"properties": {
"addressPrefix": "[variables('ASE Subnet Address range')]"
}
}
]
}
},
{
"apiVersion": "2019-02-01",
"type": "Microsoft.Web/hostingEnvironments",
"name": "[parameters('ASE Name')]",
"kind": "ASEV2",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('VNET Name'))]"
],
"properties": {
"name": "[parameters('ASE Name')]",
"location": "[resourceGroup().location]",
"InternalLoadBalancingMode": "[variables('ilbMode')]",
"virtualNetwork": {
"Id": "[variables('ASESubnetRef')]"
}
},
"tags": {
"displayName": "ILB ASE Environment"
}
},
{
"type": "Microsoft.Network/PrivateDnsZones",
"name": "[variables('newZoneName')]",
"apiVersion": "2018-09-01",
"location": "global",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('VNET Name'))]"
],
"properties": {}
},
{
"type": "Microsoft.Network/PrivateDnsZones/a",
"name": "[concat(variables('newZoneName'), '/', variables('newRecordName'))]",
"apiVersion": "2018-09-01",
"location": "global",
"dependsOn": [
"[variables('newZoneName')]"
],
"properties": {
"metadata": {},
"ttl": "3600",
"aRecords": [
{
"ipv4Address": "10.0.0.11"
}
]
}
},
{
"type": "Microsoft.Network/PrivateDnsZones/a",
"name": "[concat(variables('newZoneName'), '/', variables('newRecordName3'))]",
"apiVersion": "2018-09-01",
"location": "global",
"dependsOn": [
"[variables('newZoneName')]"
],
"properties": {
"metadata": {},
"ttl": "3600",
"aRecords": [
{
"ipv4Address": "10.0.0.11"
}
]
}
},
{
"type": "Microsoft.Network/PrivateDnsZones/a",
"name": "[concat(variables('newZoneName'), '/', variables('newRecordName2'))]",
"apiVersion": "2018-09-01",
"location": "global",
"dependsOn": [
"[variables('newZoneName')]"
],
"properties": {
"metadata": {},
"ttl": "3600",
"aRecords": [
{
"ipv4Address": "10.0.0.11"
}
]
}
},
{
"name": "[concat(variables('newZoneName'), '/', variables('vnetlinkname'))]",
"type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks",
"apiVersion": "2018-09-01",
"tags": {},
"location": "global",
"dependsOn": [
"[variables('newZoneName')]"
],
"properties": {
"virtualNetwork": {
"id": "[variables('VMVnetID')]"
},
"registrationEnabled": "false"
}
},
{
"apiVersion": "2015-08-01",
"name": "[parameters('App Service Plan Name')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/hostingEnvironments',parameters('ASE Name'))]"
],
"properties": {
"name": "[parameters('App Service Plan Name')]",
"hostingEnvironmentProfile": {
"id": "[resourceId('Microsoft.Web/hostingEnvironments',parameters('ASE Name'))]"
}
},
"sku": {
"name": "[concat('I',parameters('App Service Plan Tier'))]",
"tier": "Isolated",
"size": "[concat('I',parameters('App Service Plan Tier'))]",
"family": "I",
"capacity": "[parameters('App Service Capacity')]"
}
},
{
"apiVersion": "2015-08-01",
"name": "[parameters('Wep App Name')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('Wep App Name')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverFarms',parameters('App Service Plan Name'))]",
"hostingEnvironmentProfile": {
"id": "[resourceId('Microsoft.Web/hostingEnvironments', parameters('ASE Name'))]"
}
},
"dependsOn": [
"[concat('Microsoft.Web/serverFarms/',parameters('App Service Plan Name'))]"
]
}
],
"outputs": {}
}