1
+ {
2
+ "$schema" : " http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" ,
3
+ "contentVersion" : " 1.0.0.0" ,
4
+ "parameters" : {
5
+ "location" : {
6
+ "type" : " string"
7
+ },
8
+ "applicationGatewayName" : {
9
+ "type" : " string"
10
+ },
11
+ "tier" : {
12
+ "type" : " string"
13
+ },
14
+ "skuSize" : {
15
+ "type" : " string"
16
+ },
17
+ "capacity" : {
18
+ "type" : " int" ,
19
+ "defaultValue" : 2
20
+ },
21
+ "subnetName" : {
22
+ "type" : " string"
23
+ },
24
+ "zones" : {
25
+ "type" : " array"
26
+ },
27
+ "virtualNetworkName" : {
28
+ "type" : " string"
29
+ },
30
+ "virtualNetworkPrefix" : {
31
+ "type" : " array"
32
+ }
33
+ },
34
+ "variables" : {
35
+ "vnetId" : " [resourceId('nsc-rg-ag-westus2-thur','Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" ,
36
+ "publicIPRef" : " /subscriptions/9f4dcf43-aa06-457b-b975-f0216baef20d/resourceGroups/loanlpautomationlab01-rg/providers/Microsoft.Network/publicIPAddresses/frondendIP" ,
37
+ "subnetRef" : " [concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]" ,
38
+ "applicationGatewayId" : " [resourceId('Microsoft.Network/applicationGateways', parameters('applicationGatewayName'))]"
39
+ },
40
+ "resources" : [
41
+ {
42
+ "name" : " [parameters('applicationGatewayName')]" ,
43
+ "type" : " Microsoft.Network/applicationGateways" ,
44
+ "apiVersion" : " 2019-09-01" ,
45
+ "location" : " [parameters('location')]" ,
46
+ "zones" : " [parameters('zones')]" ,
47
+ "dependsOn" : [
48
+ " [concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]"
49
+ ],
50
+ "tags" : {},
51
+ "properties" : {
52
+ "sku" : {
53
+ "name" : " [parameters('skuSize')]" ,
54
+ "tier" : " [parameters('tier')]" ,
55
+ "capacity" : " [parameters('capacity')]"
56
+ },
57
+ "gatewayIPConfigurations" : [
58
+ {
59
+ "name" : " appGatewayIpConfig" ,
60
+ "properties" : {
61
+ "subnet" : {
62
+ "id" : " [variables('subnetRef')]"
63
+ }
64
+ }
65
+ }
66
+ ],
67
+ "frontendIPConfigurations" : [
68
+ {
69
+ "name" : " appGwPublicFrontendIp" ,
70
+ "properties" : {
71
+ "PublicIPAddress" : {
72
+ "id" : " [variables('publicIPRef')]"
73
+ }
74
+ }
75
+ }
76
+ ],
77
+ "frontendPorts" : [
78
+ {
79
+ "name" : " port_80" ,
80
+ "properties" : {
81
+ "Port" : 80
82
+ }
83
+ }
84
+ ],
85
+ "backendAddressPools" : [
86
+ {
87
+ "name" : " nsc_ag_westus2_bp" ,
88
+ "properties" : {
89
+ "backendAddresses" : []
90
+ }
91
+ }
92
+ ],
93
+ "backendHttpSettingsCollection" : [
94
+ {
95
+ "name" : " nsc_ag_westus2_http" ,
96
+ "properties" : {
97
+ "Port" : 80 ,
98
+ "Protocol" : " Http" ,
99
+ "cookieBasedAffinity" : " Disabled" ,
100
+ "requestTimeout" : 20
101
+ }
102
+ }
103
+ ],
104
+ "httpListeners" : [
105
+ {
106
+ "name" : " nsc_ag_westus2_l" ,
107
+ "properties" : {
108
+ "frontendIPConfiguration" : {
109
+ "id" : " [concat(variables('applicationGatewayId'), '/frontendIPConfigurations/appGwPublicFrontendIp')]"
110
+ },
111
+ "frontendPort" : {
112
+ "id" : " [concat(variables('applicationGatewayId'), '/frontendPorts/port_80')]"
113
+ },
114
+ "protocol" : " Http" ,
115
+ "sslCertificate" : null
116
+ }
117
+ }
118
+ ],
119
+ "requestRoutingRules" : [
120
+ {
121
+ "Name" : " nsc_ag_westus2_rrl" ,
122
+ "properties" : {
123
+ "RuleType" : " Basic" ,
124
+ "httpListener" : {
125
+ "id" : " [concat(variables('applicationGatewayId'), '/httpListeners/nsc_ag_westus2_l')]"
126
+ },
127
+ "backendAddressPool" : {
128
+ "id" : " [concat(variables('applicationGatewayId'), '/backendAddressPools/nsc_ag_westus2_bp')]"
129
+ },
130
+ "backendHttpSettings" : {
131
+ "id" : " [concat(variables('applicationGatewayId'), '/backendHttpSettingsCollection/nsc_ag_westus2_http')]"
132
+ }
133
+ }
134
+ }
135
+ ],
136
+ "enableHttp2" : false ,
137
+ "sslCertificates" : [],
138
+ "probes" : []
139
+ }
140
+ },
141
+ {
142
+ "apiVersion" : " 2019-09-01" ,
143
+ "type" : " Microsoft.Network/virtualNetworks" ,
144
+ "name" : " [parameters('virtualNetworkName')]" ,
145
+ "location" : " [parameters('location')]" ,
146
+ "properties" : {
147
+ "addressSpace" : {
148
+ "addressPrefixes" : " [parameters('virtualNetworkPrefix')]"
149
+ },
150
+ "subnets" : [
151
+ {
152
+ "name" : " default" ,
153
+ "properties" : {
154
+ "addressPrefix" : " 172.19.0.0/24"
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ }
160
+ ]
161
+ }
0 commit comments