generated from Azure/terraform-verified-module
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.app.service.tf
461 lines (442 loc) · 17.4 KB
/
variables.app.service.tf
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
###########################
# ASE Configuration ##
###########################
variable "enable_app_service_environment" {
description = "Controls if the app service environment should be enabled. Default is false."
type = bool
default = false
}
variable "app_service_environment_name" {
description = "Name of the app service environment to use"
type = string
default = null
}
##############################
# App Service Configuration ##
##############################
variable "create_app_service_plan" {
description = "Controls if the app service plan should be created. If set to false, the app service plan name must be provided. Default is true."
type = bool
default = true
}
variable "existing_app_service_plan_name" {
description = "Name of the existing app service plan to use"
type = string
default = null
}
variable "app_service_plan_os_type" {
description = "The kind of the app service plan to deploy to (Optional)"
type = string
validation {
condition = contains(["Linux", "Windows", "WindowsContainer"], var.app_service_plan_os_type)
error_message = "Must be Windows, Linux, WindowsContainer"
}
default = "Windows"
}
variable "app_service_resource_type" {
description = "The resource type of the app service plan to deploy to (Optional)"
type = string
validation {
condition = contains(["App", "FunctionApp"], var.app_service_resource_type)
error_message = "Must be App, FunctionApp"
}
default = "App"
}
variable "app_service_plan_sku_name" {
description = "Specifies the SKU for the plan"
type = string
default = null
}
variable "app_service_plan_worker_count" {
description = "Specifies the number of workers associated with this App Service Plan"
type = number
default = 1
}
variable "deployment_slot_count" {
description = "Specifies the number of deployment slots for the app service"
type = number
default = 0
}
variable "create_app_storage_account" {
description = "Controls if the storage account should be created. Default is true."
type = bool
default = true
}
variable "use_32_bit_worker" {
description = "Use 32 bit worker for the app service"
type = bool
default = false
}
variable "windows_app_site_config" {
type = object({
always_on = optional(bool)
api_definition_url = optional(string)
api_management_api_id = optional(string)
app_command_line = optional(string)
application_stack = optional(object({
current_stack = optional(string)
docker_container_name = optional(string)
docker_container_registry = optional(string)
docker_container_tag = optional(string)
dotnet_version = optional(string)
dotnet_core_version = optional(string)
tomcat_version = optional(string)
java_embedded_server_enabled = optional(bool)
java_version = optional(string)
node_version = optional(string)
php_version = optional(string)
python = optional(bool)
}))
auto_heal_enabled = optional(bool)
auto_heal_setting = optional(object({
action = object({
action_type = string
custom_action = optional(object({
executable = string
parameters = string
}))
minimum_process_execution_time = optional(string)
})
trigger = object({
private_memory_kb = optional(number)
requests = optional(object({
count = number
interval = string
}))
slow_request = list(object({
count = number
interval = string
time_taken = string
path = optional(string)
}))
status_code = list(object({
count = number
interval = string
status_code_range = string
path = optional(string)
sub_status = optional(string)
win32_status = optional(string)
}))
})
}))
container_registry_use_managed_identity = optional(bool)
cors = optional(object({
allowed_origins = list(string)
support_credentials = optional(bool)
}))
default_documents = optional(list(string))
ftps_state = optional(string)
health_check_path = optional(string)
health_check_eviction_time_in_min = optional(number)
http2_enabled = optional(bool)
ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
load_balancing_mode = optional(string)
local_mysql_enabled = optional(bool)
managed_pipeline_mode = optional(string)
minimum_tls_version = optional(string)
remote_debugging_enabled = optional(bool)
remote_debugging_version = optional(string)
scm_ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
scm_minimum_tls_version = optional(string)
scm_use_main_ip_restriction = optional(bool)
use_32_bit_worker = optional(bool)
virtual_application = optional(list(object({
physical_path = string
preload = bool
virtual_path = string
virtual_directory = optional(object({
physical_path = optional(string)
virtual_path = optional(string)
}))
})))
vnet_route_all_enabled = optional(bool)
websockets_enabled = optional(bool)
worker_count = optional(number)
})
default = null
}
variable "windows_function_app_site_config" {
type = object({
always_on = optional(bool)
api_definition_url = optional(string)
api_management_api_id = optional(string)
app_command_line = optional(string)
app_scale_limit = optional(number)
application_insights_connection_string = optional(string)
application_insights_key = optional(string)
application_stack = optional(object({
dotnet_version = optional(string)
use_dotnet_isolated_runtime = optional(bool)
java_version = optional(string)
node_version = optional(string)
powershell_core_version = optional(string)
use_custom_runtime = optional(bool)
}))
app_service_logs = optional(object({
disk_quota_mb = optional(number)
retention_period_days = optional(number)
}))
cors = optional(object({
allowed_origins = list(string)
support_credentials = optional(bool)
}))
default_documents = optional(list(string))
elastic_instance_minimum = optional(number)
ftps_state = optional(string)
health_check_path = optional(string)
health_check_eviction_time_in_min = optional(number)
http2_enabled = optional(bool)
ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
load_balancing_mode = optional(string)
managed_pipeline_mode = optional(string)
minimum_tls_version = optional(string)
pre_warmed_instance_count = optional(number)
remote_debugging_enabled = optional(bool)
remote_debugging_version = optional(string)
runtime_scale_monitoring_enabled = optional(bool)
scm_ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
scm_minimum_tls_version = optional(string)
scm_use_main_ip_restriction = optional(bool)
use_32_bit_worker = optional(bool)
virtual_application = optional(list(object({
physical_path = string
preload = bool
virtual_path = string
virtual_directory = optional(object({
physical_path = optional(string)
virtual_path = optional(string)
}))
})))
vnet_route_all_enabled = optional(bool)
websockets_enabled = optional(bool)
worker_count = optional(number)
})
default = null
}
variable "linux_app_site_config" {
type = object({
always_on = optional(bool)
api_definition_url = optional(string)
api_management_api_id = optional(string)
app_command_line = optional(string)
application_stack = optional(object({
docker_image = optional(string)
docker_image_tag = optional(string)
dotnet_version = optional(string)
go_version = optional(string)
java_server = optional(string)
java_server_version = optional(string)
java_version = optional(string)
node_version = optional(string)
php_version = optional(string)
python_version = optional(string)
ruby_version = optional(string)
}))
container_registry_use_managed_identity = optional(bool)
cors = optional(object({
allowed_origins = list(string)
support_credentials = optional(bool)
}))
default_documents = optional(list(string))
ftps_state = optional(string)
health_check_path = optional(string)
health_check_eviction_time_in_min = optional(number)
http2_enabled = optional(bool)
ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
load_balancing_mode = optional(string)
local_mysql_enabled = optional(bool)
managed_pipeline_mode = optional(string)
minimum_tls_version = optional(string)
remote_debugging_enabled = optional(bool)
remote_debugging_version = optional(string)
scm_ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
scm_minimum_tls_version = optional(string)
scm_use_main_ip_restriction = optional(bool)
use_32_bit_worker = optional(bool)
vnet_route_all_enabled = optional(bool)
websockets_enabled = optional(bool)
worker_count = optional(number)
})
default = null
}
variable "linux_function_app_site_config" {
type = object({
always_on = optional(bool)
api_definition_url = optional(string)
api_management_api_id = optional(string)
app_command_line = optional(string)
app_scale_limit = optional(number)
application_insights_connection_string = optional(string)
application_insights_key = optional(string)
application_stack = optional(object({
docker = optional(object({
registry_url = string
image_name = string
image_tag = string
registry_username = optional(string)
}))
dotnet_version = optional(string)
use_dotnet_isolated_runtime = optional(bool)
java_version = optional(string)
node_version = optional(string)
python_version = optional(string)
powershell_core_version = optional(string)
use_custom_runtime = optional(bool)
}))
app_service_logs = optional(object({
disk_quota_mb = optional(number)
retention_period_days = optional(number)
}))
container_registry_use_managed_identity = optional(bool)
cors = optional(object({
allowed_origins = list(string)
support_credentials = optional(bool)
}))
default_documents = optional(list(string))
elastic_instance_minimum = optional(number)
ftps_state = optional(string)
health_check_path = optional(string)
health_check_eviction_time_in_min = optional(number)
http2_enabled = optional(bool)
ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
load_balancing_mode = optional(string)
managed_pipeline_mode = optional(string)
minimum_tls_version = optional(string)
pre_warmed_instance_count = optional(number)
remote_debugging_enabled = optional(bool)
remote_debugging_version = optional(string)
runtime_scale_monitoring_enabled = optional(bool)
scm_ip_restriction = optional(list(object({
action = optional(string)
headers = optional(object({
x_azure_fdid = optional(list(string))
x_fd_health_probe = optional(number)
x_forwarded_for = optional(list(string))
x_forwarded_host = optional(list(string))
}))
ip_address = optional(string)
name = optional(string)
priority = optional(number)
service_tag = optional(string)
virtual_network_subnet_id = optional(string)
})))
scm_minimum_tls_version = optional(string)
scm_use_main_ip_restriction = optional(bool)
use_32_bit_worker = optional(bool)
vnet_route_all_enabled = optional(bool)
websockets_enabled = optional(bool)
worker_count = optional(number)
})
default = null
}
variable website_run_from_package {
type = string
description = "Allows your apps to run from a deployment ZIP package file. You can enable this with a setting of 1, or a URL to a package path"
default = null
}
#######################################
# Application Insights Configuration #
#######################################
variable "enable_application_insights" {
description = "Controls if the application insights should be created. Default is true."
type = bool
default = true
}
variable "log_analytics_workspace_id" {
description = "The name of the log analytics workspace to deploy application insights to (Optional)"
type = string
default = null
}