generated from cyber-scot/terraform-module-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
642 lines (539 loc) · 20.6 KB
/
variables.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
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
variable "allow_resource_only_permissions" {
type = bool
description = "Whether users require permissions to resources to view logs"
default = true
}
variable "app_insights_name" {
type = string
description = "The name of the App insights"
default = null
}
variable "app_service_plan_name" {
type = string
description = "The name of the app service plan"
default = null
}
variable "assign_current_client_blob_owner" {
type = bool
description = "Whether the current client should be assigned roles for the storage account"
default = false
}
variable "assign_current_client_queue_contributor" {
type = bool
description = "Whether the current client should be assigned roles for the storage account"
default = false
}
variable "assign_current_client_smb_contributor" {
type = bool
description = "Whether the current client should be assigned roles for the storage account"
default = false
}
variable "assign_current_client_table_contributor" {
type = bool
description = "Whether the current client should be assigned roles for the storage account"
default = false
}
variable "attempt_fetch_remote_start_stop_code" {
type = bool
description = "Whether the start/stop code should be remote fetched"
default = false
}
variable "auto_stop_logic_app_enabled" {
type = bool
description = "Whether auto_stop logic app is enabled"
default = false
}
variable "auto_stop_logic_app_evaluation_frequency" {
type = string
description = "What frequency the auto stop logic app should be evaluating at, for example, Hour, Day etc"
default = "Hour"
validation {
condition = var.auto_stop_logic_app_evaluation_frequency == null || can(regex("^(Month|Week|Day|Hour|Minute|Second)$", var.auto_stop_logic_app_evaluation_frequency))
error_message = "auto_stop_logic_app_evaluation_frequency must be one of Month, Week, Day, Hour, Minute, or Second."
}
}
variable "auto_stop_logic_app_evaluation_interval_number" {
type = string
description = "What number the auto stop logic app should be evaluating at, for example, Hour, Day etc"
default = 8
validation {
condition = var.auto_stop_logic_app_evaluation_interval_number == null || (try(tonumber(var.auto_stop_logic_app_evaluation_interval_number) > 0, false))
error_message = "auto_stop_logic_app_evaluation_interval_number must be a positive integer."
}
}
variable "auto_stop_logic_app_evaluation_interval_start_time" {
type = string
description = "What frequency the auto_stop logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.auto_stop_logic_app_evaluation_interval_start_time == null || can(timestamp(var.auto_stop_logic_app_evaluation_interval_start_time))
error_message = "The start_time must be in a valid RFC3339 format, or left as null."
}
}
variable "auto_stop_logic_app_name" {
type = string
description = "The name of the auto_stop logic app"
default = null
}
variable "auto_stop_query_action_groups" {
type = set(string)
description = "The action groups for the auto_stop_query"
default = []
}
variable "auto_stop_query_alert_name" {
type = string
description = "The name of the alert name"
default = null
}
variable "auto_stop_query_alert_scopes" {
type = set(string)
description = "The name of the alert name"
default = []
}
variable "auto_stop_resource_group_scopes" {
type = set(string)
description = "The scopes for the auto_stop logic app resource groups"
default = [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1/",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg2/"
]
}
variable "auto_stop_schedules" {
description = "A list of schedules for auto_stop logic app"
type = list(object({
days = optional(list(string), [])
hours = optional(list(number), [])
minutes = optional(list(number), [])
}))
default = []
}
variable "cmk_for_query_forced" {
type = bool
description = "Whether or not a Customer Managed Key for the query is forced"
default = false
}
variable "create_law_linked_app_insights" {
type = bool
description = "Whether a law workspace linked app insights should be used - if set false, the old type which will be used which will be deprecated in Feb 2024"
default = false
}
variable "create_new_law" {
type = bool
description = "Whether or not you wish to create a new workspace, if set to true, a new one will be created, if set to false, a data read will be performed on a data source"
default = false
}
variable "daily_quota_gb" {
type = string
description = "The amount of gb set for max daily ingetion"
default = "30"
}
variable "dashboard_name" {
type = string
description = "The name of the dashboard that is made for the start stop solution"
default = null
}
variable "email_receivers" {
type = list(object({
email_address = string
name = string
}))
default = []
description = "List of email receivers for the action group"
}
variable "function_app_https_only" {
type = bool
description = "Whether the function app should be function app only"
default = false
}
variable "function_app_name" {
type = string
description = "The name of function app"
default = null
}
variable "internet_ingestion_enabled" {
type = bool
description = "Whether internet ingestion is enabled"
default = null
}
variable "internet_query_enabled" {
type = bool
description = "Whether or not your workspace can be queried from the internet"
default = null
}
variable "law_id" {
type = string
description = "The ID of the log analytics workspace id to link app insights too"
default = null
}
variable "law_name" {
type = string
description = "The name of a log analytics workspace"
default = null
}
variable "law_sku" {
type = string
description = "The sku of the log analytics workspace"
default = "PerGB2018"
}
variable "local_authentication_disabled" {
type = bool
description = "Whether local authentication is enabled, defaults to false"
default = false
}
variable "location" {
type = string
description = "The location (region) the resource should be put in, e.g. uksouth"
}
variable "lock_level" {
type = string
description = "The name of the lock_level, can only be CanNotDelete or Readonly"
default = null
validation {
condition = var.lock_level != "CanNotDelete" || var.lock_level != "ReadOnly"
error_message = "The only accepted parameters for lock_level is are CanNotDelete or ReadOnly."
}
}
variable "logic_app_default_timezone" {
type = string
description = "The timezone in which all logic app schedules are set to"
default = null
}
variable "microsoft_instrumentation_key" {
type = string
description = "The centralised microsoft instrumentation key for start/stop telemetry"
default = null
}
variable "name" {
type = string
description = "The name of the resource"
}
variable "notification_action_group_name" {
type = string
default = null
description = "The name of the Start/Start alert action group"
}
variable "notification_action_group_short_name" {
type = string
description = "The short name for the notification, normally used in SMS"
default = null
}
variable "reservation_capacity_in_gb_per_day" {
type = string
description = "The reservation capacity gb per day, can only be used with CapacityReservation SKU"
default = "30"
}
variable "retention_in_days" {
type = string
description = "The number of days for retention, between 7 and 730"
default = "30"
}
variable "scheduled_query_action_groups" {
type = set(string)
description = "The action groups for the scheduled_query"
default = []
}
variable "scheduled_query_alert_scopes" {
type = set(string)
description = "The action groups for the scheduled_scopes"
default = []
}
variable "scheduled_start_logic_app_enabled" {
type = bool
description = "Whether scheduled_start logic app is enabled"
default = false
}
variable "scheduled_start_logic_app_evaluation_frequency" {
type = string
description = "What frequency the scheduled_start logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.scheduled_start_logic_app_evaluation_frequency == null || can(regex("^(Month|Week|Day|Hour|Minute|Second)$", var.scheduled_start_logic_app_evaluation_frequency))
error_message = "scheduled_start_logic_app_evaluation_frequency must be one of Month, Week, Day, Hour, Minute, or Second."
}
}
variable "scheduled_start_logic_app_evaluation_interval_number" {
type = number
description = "What frequency the scheduled_start logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.scheduled_start_logic_app_evaluation_interval_number == null || (try(tonumber(var.scheduled_start_logic_app_evaluation_interval_number) > 0, false))
error_message = "scheduled_start_logic_app_evaluation_interval_number must be a positive integer."
}
}
variable "scheduled_start_logic_app_evaluation_interval_start_time" {
type = string
description = "What frequency the scheduled_start logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.scheduled_start_logic_app_evaluation_interval_start_time == null || can(timestamp(var.scheduled_start_logic_app_evaluation_interval_start_time))
error_message = "The start_time must be in a valid RFC3339 format, or left as null."
}
}
variable "scheduled_start_logic_app_name" {
type = string
description = "The name of the scheduled start name"
default = null
}
variable "scheduled_start_resource_group_scopes" {
type = set(string)
description = "The scopes for the scheduled start logic app resource groups"
default = [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1/",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg2/"
]
}
variable "scheduled_start_schedules" {
description = "A list of schedules for scheduled_start logic app"
type = list(object({
days = optional(list(string), [])
hours = optional(list(number), [])
minutes = optional(list(number), [])
}))
default = []
}
variable "scheduled_start_stop_query_alert_name" {
type = string
description = "The name of the scheduled start stop function"
default = null
}
variable "scheduled_stop_logic_app_enabled" {
type = bool
description = "Whether sequenced_stop logic app is enabled"
default = false
}
variable "scheduled_stop_logic_app_evaluation_frequency" {
type = string
description = "What frequency the scheduled_stop logic app should be evaluating at, for example, Hour, Day etc"
default = "Hour"
validation {
condition = var.scheduled_stop_logic_app_evaluation_frequency == null || can(regex("^(Month|Week|Day|Hour|Minute|Second)$", var.scheduled_stop_logic_app_evaluation_frequency))
error_message = "scheduled_stop_logic_app_evaluation_frequency must be one of Month, Week, Day, Hour, Minute, or Second."
}
}
variable "scheduled_stop_logic_app_evaluation_interval_number" {
type = number
description = "What frequency the scheduled_stop logic app should be evaluating at, for example, Hour, Day etc"
default = 8
validation {
condition = var.scheduled_stop_logic_app_evaluation_interval_number == null || (try(tonumber(var.scheduled_stop_logic_app_evaluation_interval_number) > 0, false))
error_message = "scheduled_stop_logic_app_evaluation_interval_number must be a positive integer."
}
}
variable "scheduled_stop_logic_app_evaluation_interval_start_time" {
type = string
description = "What frequency the scheduled_stop logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.scheduled_stop_logic_app_evaluation_interval_start_time == null || can(timestamp(var.scheduled_stop_logic_app_evaluation_interval_start_time))
error_message = "The start_time must be in a valid RFC3339 format, or left as null."
}
}
variable "scheduled_stop_logic_app_name" {
type = string
description = "The name of the scheduled_stop logic app"
default = null
}
variable "scheduled_stop_resource_group_scopes" {
type = set(string)
description = "The scopes for the scheduled stop logic app resource groups"
default = [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1/",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg2/"
]
}
variable "scheduled_stop_schedules" {
description = "A list of schedules for scheduled_stop logic app"
type = list(object({
days = optional(list(string), [])
hours = optional(list(number), [])
minutes = optional(list(number), [])
}))
default = []
}
variable "sequenced_query_action_groups" {
type = set(string)
description = "The action groups for the sequenced_query"
default = []
}
variable "sequenced_query_alert_scopes" {
type = set(string)
description = "The action groups for the sequenced_scopes"
default = []
}
variable "sequenced_start_logic_app_enabled" {
type = bool
description = "Whether sequenced_start logic app is enabled"
default = false
}
variable "sequenced_start_logic_app_evaluation_frequency" {
type = string
description = "What frequency the sequenced_start logic app should be evaluating at, for example, Hour, Day etc"
default = "Hour"
validation {
condition = var.sequenced_start_logic_app_evaluation_frequency == null || can(regex("^(Month|Week|Day|Hour|Minute|Second)$", var.sequenced_start_logic_app_evaluation_frequency))
error_message = "sequenced_start_logic_app_evaluation_frequency must be one of Month, Week, Day, Hour, Minute, or Second."
}
}
variable "sequenced_start_logic_app_evaluation_interval_number" {
type = number
description = "What frequency the sequenced_start logic app should be evaluating at, for example, Hour, Day etc"
default = 8
validation {
condition = var.sequenced_start_logic_app_evaluation_interval_number == null || (try(tonumber(var.sequenced_start_logic_app_evaluation_interval_number) > 0, false))
error_message = "sequenced_start_logic_app_evaluation_interval_number must be a positive integer."
}
}
variable "sequenced_start_logic_app_evaluation_interval_start_time" {
type = string
description = "What frequency the sequenced_start logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.sequenced_start_logic_app_evaluation_interval_start_time == null || can(timestamp(var.sequenced_start_logic_app_evaluation_interval_start_time))
error_message = "The start_time must be in a valid RFC3339 format, or left as null."
}
}
variable "sequenced_start_logic_app_name" {
type = string
description = "The name of the sequenced start logic app name"
default = null
}
variable "sequenced_start_resource_group_scopes" {
type = set(string)
description = "The scopes for the sequenced start logic app resource groups"
default = [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1/",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg2/"
]
}
variable "sequenced_start_schedules" {
description = "A list of schedules for sequenced_start logic app"
type = list(object({
days = optional(list(string), [])
hours = optional(list(number), [])
minutes = optional(list(number), [])
}))
default = []
}
variable "sequenced_stop_logic_app_enabled" {
type = bool
description = "Whether sequenced_stop logic app is enabled"
default = false
}
variable "sequenced_stop_logic_app_evaluation_frequency" {
type = string
description = "What frequency the sequenced_stop logic app should be evaluating at, for example, Hour, Day etc"
default = "Hour"
validation {
condition = var.sequenced_stop_logic_app_evaluation_frequency == null || can(regex("^(Month|Week|Day|Hour|Minute|Second)$", var.sequenced_stop_logic_app_evaluation_frequency))
error_message = "sequenced_stop_logic_app_evaluation_frequency must be one of Month, Week, Day, Hour, Minute, or Second."
}
}
variable "sequenced_stop_logic_app_evaluation_interval_number" {
type = number
description = "What frequency the sequenced_stop logic app should be evaluating at, for example, Hour, Day etc"
default = 8
validation {
condition = var.sequenced_stop_logic_app_evaluation_interval_number == null || (try(tonumber(var.sequenced_stop_logic_app_evaluation_interval_number) > 0, false))
error_message = "sequenced_stop_logic_app_evaluation_interval_number must be a positive integer."
}
}
variable "sequenced_stop_logic_app_evaluation_interval_start_time" {
type = string
description = "What frequency the sequenced_stop logic app should be evaluating at, for example, Hour, Day etc"
default = null
validation {
condition = var.sequenced_stop_logic_app_evaluation_interval_start_time == null || can(timestamp(var.sequenced_stop_logic_app_evaluation_interval_start_time))
error_message = "The start_time must be in a valid RFC3339 format, or left as null."
}
}
variable "sequenced_stop_logic_app_name" {
type = string
description = "The name of the sequenced stop logic app"
default = null
}
variable "sequenced_stop_resource_group_scopes" {
type = set(string)
description = "The scopes for the sequenced stop logic app resource groups"
default = [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1/",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg2/"
]
}
variable "sequenced_stop_schedules" {
description = "A list of schedules for sequenced_stop logic app"
type = list(object({
days = optional(list(string), [])
hours = optional(list(number), [])
minutes = optional(list(number), [])
}))
default = []
}
variable "smart_detection_action_group_name" {
type = string
description = "The smart detection ag name"
default = null
}
variable "smart_detection_action_group_short_name" {
type = string
description = "The short name for the smart detection action group"
default = null
}
variable "start_stop_source_url" {
type = string
description = "The URL of the source file for start/stop"
default = "https://startstopv2prod.blob.core.windows.net/artifacts/StartStopV2.zip"
}
variable "storage_account_firewall_bypass" {
description = "The bypass features of the storage account firewall"
type = set(string)
default = ["AzureServices", "Logging", "Metrics"]
}
variable "storage_account_firewall_default_action" {
description = "The default action of the storage account firewall"
type = string
default = "Allow"
}
variable "storage_account_firewall_subnet_ids" {
description = "List of subnet_ids"
type = list(string)
default = []
}
variable "storage_account_firewall_user_ip_rules" {
description = "List of user-specified IP rules"
type = list(string)
default = []
}
variable "storage_account_fiwall_subnet_ids" {
description = "List of user-specified subnet IDs"
type = list(string)
default = []
}
variable "storage_account_name" {
type = string
description = "The name of the storage account to be made"
default = null
}
variable "storage_account_public_network_access_enabled" {
type = bool
description = "Whether public network access are enabled on the storage account"
default = true
}
variable "storage_account_shared_access_keys_enabled" {
type = bool
description = "Whether shared access keys are enabled on the storage account"
default = true
}
variable "tags" {
type = map(string)
description = "The tags assigned to the resource"
}
variable "use_user_assigned_identity" {
description = "Whether to use user assigned managed identity for the solution"
type = bool
default = false
}
variable "user_assigned_identity_name" {
description = "The name of the user assigned identity, if used"
type = string
default = null
}