forked from Azure/terraform-azurerm-caf-enterprise-scale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
805 lines (765 loc) · 36.4 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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# The following variables are used to configure the default
# Enterprise-scale Management Groups.
#
# Further information provided within the description block
# for each variable
variable "root_parent_id" {
type = string
description = "The root_parent_id is used to specify where to set the root for all Landing Zone deployments. Usually the Tenant ID when deploying the core Enterprise-scale Landing Zones."
validation {
condition = can(regex("^[a-zA-Z0-9-_\\(\\)\\.]{1,36}$", var.root_parent_id))
error_message = "Value must be a valid Management Group ID, consisting of alphanumeric characters, hyphens, underscores, periods and parentheses."
}
}
variable "root_id" {
type = string
description = "If specified, will set a custom Name (ID) value for the Enterprise-scale \"root\" Management Group, and append this to the ID for all core Enterprise-scale Management Groups."
default = "es"
validation {
condition = can(regex("^[a-zA-Z0-9-]{2,10}$", var.root_id))
error_message = "Value must be between 2 to 10 characters long, consisting of alphanumeric characters and hyphens."
}
}
variable "root_name" {
type = string
description = "If specified, will set a custom Display Name value for the Enterprise-scale \"root\" Management Group."
default = "Enterprise-Scale"
validation {
condition = can(regex("^[A-Za-z][A-Za-z0-9- ._]{1,22}[A-Za-z0-9]?$", var.root_name))
error_message = "Value must be between 2 to 24 characters long, start with a letter, end with a letter or number, and can only contain space, hyphen, underscore or period characters."
}
}
variable "deploy_core_landing_zones" {
type = bool
description = "If set to true, module will deploy the core Enterprise-scale Management Group hierarchy, including \"out of the box\" policies and roles."
default = true
}
variable "deploy_corp_landing_zones" {
type = bool
description = "If set to true, module will deploy the \"Corp\" Management Group, including \"out of the box\" policies and roles."
default = false
}
variable "deploy_online_landing_zones" {
type = bool
description = "If set to true, module will deploy the \"Online\" Management Group, including \"out of the box\" policies and roles."
default = false
}
variable "deploy_sap_landing_zones" {
type = bool
description = "If set to true, module will deploy the \"SAP\" Management Group, including \"out of the box\" policies and roles."
default = false
}
variable "deploy_demo_landing_zones" {
type = bool
description = "If set to true, module will deploy the demo \"Landing Zone\" Management Groups (\"Corp\", \"Online\", and \"SAP\") into the core Enterprise-scale Management Group hierarchy."
default = false
}
variable "deploy_management_resources" {
type = bool
description = "If set to true, will enable the \"Management\" landing zone settings and add \"Management\" resources into the current Subscription context."
default = false
}
variable "configure_management_resources" {
type = object({
settings = optional(object({
log_analytics = optional(object({
enabled = optional(bool, true)
config = optional(object({
retention_in_days = optional(number, 30)
enable_monitoring_for_vm = optional(bool, true)
enable_monitoring_for_vmss = optional(bool, true)
enable_solution_for_agent_health_assessment = optional(bool, true)
enable_solution_for_anti_malware = optional(bool, true)
enable_solution_for_change_tracking = optional(bool, true)
enable_solution_for_service_map = optional(bool, true)
enable_solution_for_sql_assessment = optional(bool, true)
enable_solution_for_sql_vulnerability_assessment = optional(bool, true)
enable_solution_for_sql_advanced_threat_detection = optional(bool, true)
enable_solution_for_updates = optional(bool, true)
enable_solution_for_vm_insights = optional(bool, true)
enable_sentinel = optional(bool, true)
}), {})
}), {})
security_center = optional(object({
enabled = optional(bool, true)
config = optional(object({
email_security_contact = optional(string, "security_contact@replace_me")
enable_defender_for_app_services = optional(bool, true)
enable_defender_for_arm = optional(bool, true)
enable_defender_for_containers = optional(bool, true)
enable_defender_for_dns = optional(bool, true)
enable_defender_for_key_vault = optional(bool, true)
enable_defender_for_oss_databases = optional(bool, true)
enable_defender_for_servers = optional(bool, true)
enable_defender_for_sql_servers = optional(bool, true)
enable_defender_for_sql_server_vms = optional(bool, true)
enable_defender_for_storage = optional(bool, true)
}), {})
}), {})
}), {})
location = optional(string, "")
tags = optional(any, {})
advanced = optional(any, {})
})
description = "If specified, will customize the \"Management\" landing zone settings and resources."
default = {
settings = {
log_analytics = {
enabled = true
config = {
retention_in_days = 30
enable_monitoring_for_vm = true
enable_monitoring_for_vmss = true
enable_solution_for_agent_health_assessment = true
enable_solution_for_anti_malware = true
enable_solution_for_change_tracking = true
enable_solution_for_service_map = true
enable_solution_for_sql_assessment = true
enable_solution_for_sql_vulnerability_assessment = true
enable_solution_for_sql_advanced_threat_detection = true
enable_solution_for_updates = true
enable_solution_for_vm_insights = true
enable_sentinel = true
}
}
security_center = {
enabled = true
config = {
email_security_contact = "security_contact@replace_me"
enable_defender_for_app_services = true
enable_defender_for_arm = true
enable_defender_for_containers = true
enable_defender_for_dns = true
enable_defender_for_key_vault = true
enable_defender_for_oss_databases = true
enable_defender_for_servers = true
enable_defender_for_sql_servers = true
enable_defender_for_sql_server_vms = true
enable_defender_for_storage = true
}
}
}
}
}
variable "deploy_identity_resources" {
type = bool
description = "If set to true, will enable the \"Identity\" landing zone settings."
default = false
}
variable "configure_identity_resources" {
type = object({
settings = optional(object({
identity = optional(object({
enabled = optional(bool, true)
config = optional(object({
enable_deny_public_ip = optional(bool, true)
enable_deny_rdp_from_internet = optional(bool, true)
enable_deny_subnet_without_nsg = optional(bool, true)
enable_deploy_azure_backup_on_vms = optional(bool, true)
}), {})
}), {})
}), {})
})
description = "If specified, will customize the \"Identity\" landing zone settings."
default = {
settings = {
identity = {
enabled = true
config = {
enable_deny_public_ip = true
enable_deny_rdp_from_internet = true
enable_deny_subnet_without_nsg = true
enable_deploy_azure_backup_on_vms = true
}
}
}
}
}
variable "deploy_connectivity_resources" {
type = bool
description = "If set to true, will enable the \"Connectivity\" landing zone settings and add \"Connectivity\" resources into the current Subscription context."
default = false
}
# Notes for the `configure_connectivity_resources` variable:
#
# `settings.hub_network_virtual_network_gateway.config.address_prefix`
# - Only support adding a single address prefix for GatewaySubnet subnet
#
# `settings.hub_network_virtual_network_gateway.config.gateway_sku_expressroute`
# - If specified, will deploy the ExpressRoute gateway into the GatewaySubnet subnet
#
# `settings.hub_network_virtual_network_gateway.config.gateway_sku_vpn`
# - If specified, will deploy the VPN gateway into the GatewaySubnet subnet
#
# `settings.hub_network_virtual_network_gateway.config.advanced_vpn_settings.private_ip_address_allocation`
# - Valid options are "", "Static" or "Dynamic". Will set `private_ip_address_enabled` and `private_ip_address_allocation` as needed.
#
# `settings.azure_firewall.config.address_prefix`
# - Only support adding a single address prefix for AzureFirewallManagementSubnet subnet
variable "configure_connectivity_resources" {
type = object({
settings = optional(object({
hub_networks = optional(list(
object({
enabled = optional(bool, true)
config = object({
address_space = list(string)
location = optional(string, "")
link_to_ddos_protection_plan = optional(bool, false)
dns_servers = optional(list(string), [])
bgp_community = optional(string, "")
subnets = optional(list(
object({
name = string
address_prefixes = list(string)
network_security_group_id = optional(string, "")
route_table_id = optional(string, "")
})
), [])
virtual_network_gateway = optional(object({
enabled = optional(bool, false)
config = optional(object({
address_prefix = optional(string, "")
gateway_sku_expressroute = optional(string, "")
gateway_sku_vpn = optional(string, "")
advanced_vpn_settings = optional(object({
enable_bgp = optional(bool, null)
active_active = optional(bool, null)
private_ip_address_allocation = optional(string, "")
default_local_network_gateway_id = optional(string, "")
vpn_client_configuration = optional(list(
object({
address_space = list(string)
aad_tenant = optional(string, null)
aad_audience = optional(string, null)
aad_issuer = optional(string, null)
root_certificate = optional(list(
object({
name = string
public_cert_data = string
})
), [])
revoked_certificate = optional(list(
object({
name = string
public_cert_data = string
})
), [])
radius_server_address = optional(string, null)
radius_server_secret = optional(string, null)
vpn_client_protocols = optional(list(string), null)
vpn_auth_types = optional(list(string), null)
})
), [])
bgp_settings = optional(list(
object({
asn = optional(number, null)
peer_weight = optional(number, null)
peering_addresses = optional(list(
object({
ip_configuration_name = optional(string, null)
apipa_addresses = optional(list(string), null)
})
), [])
})
), [])
custom_route = optional(list(
object({
address_prefixes = optional(list(string), [])
})
), [])
}), {})
}), {})
}), {})
azure_firewall = optional(object({
enabled = optional(bool, false)
config = optional(object({
address_prefix = optional(string, "")
enable_dns_proxy = optional(bool, true)
dns_servers = optional(list(string), [])
sku_tier = optional(string, "Standard")
base_policy_id = optional(string, "")
private_ip_ranges = optional(list(string), [])
threat_intelligence_mode = optional(string, "Alert")
threat_intelligence_allowlist = optional(list(string), [])
availability_zones = optional(object({
zone_1 = optional(bool, true)
zone_2 = optional(bool, true)
zone_3 = optional(bool, true)
}), {})
}), {})
}), {})
spoke_virtual_network_resource_ids = optional(list(string), [])
enable_outbound_virtual_network_peering = optional(bool, false)
enable_hub_network_mesh_peering = optional(bool, false)
})
})
), [])
vwan_hub_networks = optional(list(
object({
enabled = optional(bool, true)
config = object({
address_prefix = string
location = string
sku = optional(string, "")
routes = optional(list(
object({
address_prefixes = list(string)
next_hop_ip_address = string
})
), [])
expressroute_gateway = optional(object({
enabled = optional(bool, false)
config = optional(object({
scale_unit = optional(number, 1)
}), {})
}), {})
vpn_gateway = optional(object({
enabled = optional(bool, false)
config = optional(object({
bgp_settings = optional(list(
object({
asn = number
peer_weight = number
instance_0_bgp_peering_address = optional(list(
object({
custom_ips = list(string)
})
), [])
instance_1_bgp_peering_address = optional(list(
object({
custom_ips = list(string)
})
), [])
})
), [])
routing_preference = optional(string, "Microsoft Network")
scale_unit = optional(number, 1)
}), {})
}), {})
azure_firewall = optional(object({
enabled = optional(bool, false)
config = optional(object({
enable_dns_proxy = optional(bool, true)
dns_servers = optional(list(string), [])
sku_tier = optional(string, "Standard")
base_policy_id = optional(string, "")
private_ip_ranges = optional(list(string), [])
threat_intelligence_mode = optional(string, "Alert")
threat_intelligence_allowlist = optional(list(string), [])
availability_zones = optional(object({
zone_1 = optional(bool, true)
zone_2 = optional(bool, true)
zone_3 = optional(bool, true)
}), {})
}), {})
}), {})
spoke_virtual_network_resource_ids = optional(list(string), [])
secure_spoke_virtual_network_resource_ids = optional(list(string), [])
enable_virtual_hub_connections = optional(bool, false)
})
})
), [])
ddos_protection_plan = optional(object({
enabled = optional(bool, false)
config = optional(object({
location = optional(string, "")
}), {})
}), {})
dns = optional(object({
enabled = optional(bool, true)
config = optional(object({
location = optional(string, "")
enable_private_link_by_service = optional(object({
azure_api_management = optional(bool, true)
azure_app_configuration_stores = optional(bool, true)
azure_arc = optional(bool, true)
azure_automation_dscandhybridworker = optional(bool, true)
azure_automation_webhook = optional(bool, true)
azure_backup = optional(bool, true)
azure_batch_account = optional(bool, true)
azure_bot_service_bot = optional(bool, true)
azure_bot_service_token = optional(bool, true)
azure_cache_for_redis = optional(bool, true)
azure_cache_for_redis_enterprise = optional(bool, true)
azure_container_registry = optional(bool, true)
azure_cosmos_db_cassandra = optional(bool, true)
azure_cosmos_db_gremlin = optional(bool, true)
azure_cosmos_db_mongodb = optional(bool, true)
azure_cosmos_db_sql = optional(bool, true)
azure_cosmos_db_table = optional(bool, true)
azure_data_explorer = optional(bool, true)
azure_data_factory = optional(bool, true)
azure_data_factory_portal = optional(bool, true)
azure_data_health_data_services = optional(bool, true)
azure_data_lake_file_system_gen2 = optional(bool, true)
azure_database_for_mariadb_server = optional(bool, true)
azure_database_for_mysql_server = optional(bool, true)
azure_database_for_postgresql_server = optional(bool, true)
azure_digital_twins = optional(bool, true)
azure_event_grid_domain = optional(bool, true)
azure_event_grid_topic = optional(bool, true)
azure_event_hubs_namespace = optional(bool, true)
azure_file_sync = optional(bool, true)
azure_hdinsights = optional(bool, true)
azure_iot_dps = optional(bool, true)
azure_iot_hub = optional(bool, true)
azure_key_vault = optional(bool, true)
azure_key_vault_managed_hsm = optional(bool, true)
azure_kubernetes_service_management = optional(bool, true)
azure_machine_learning_workspace = optional(bool, true)
azure_managed_disks = optional(bool, true)
azure_media_services = optional(bool, true)
azure_migrate = optional(bool, true)
azure_monitor = optional(bool, true)
azure_purview_account = optional(bool, true)
azure_purview_studio = optional(bool, true)
azure_relay_namespace = optional(bool, true)
azure_search_service = optional(bool, true)
azure_service_bus_namespace = optional(bool, true)
azure_site_recovery = optional(bool, true)
azure_sql_database_sqlserver = optional(bool, true)
azure_synapse_analytics_dev = optional(bool, true)
azure_synapse_analytics_sql = optional(bool, true)
azure_synapse_studio = optional(bool, true)
azure_web_apps_sites = optional(bool, true)
azure_web_apps_static_sites = optional(bool, true)
cognitive_services_account = optional(bool, true)
microsoft_power_bi = optional(bool, true)
signalr = optional(bool, true)
signalr_webpubsub = optional(bool, true)
storage_account_blob = optional(bool, true)
storage_account_file = optional(bool, true)
storage_account_queue = optional(bool, true)
storage_account_table = optional(bool, true)
storage_account_web = optional(bool, true)
}), {})
private_link_locations = optional(list(string), [])
public_dns_zones = optional(list(string), [])
private_dns_zones = optional(list(string), [])
enable_private_dns_zone_virtual_network_link_on_hubs = optional(bool, true)
enable_private_dns_zone_virtual_network_link_on_spokes = optional(bool, true)
virtual_network_resource_ids_to_link = optional(list(string), [])
}), {})
}), {})
}), {})
location = optional(string, "")
tags = optional(any, {})
advanced = optional(any, {})
})
description = "If specified, will customize the \"Connectivity\" landing zone settings and resources."
default = {
settings = {
hub_networks = [
{
enabled = true
config = {
address_space = ["10.100.0.0/16", ]
location = ""
link_to_ddos_protection_plan = false
dns_servers = []
bgp_community = ""
subnets = []
virtual_network_gateway = {
enabled = false
config = {
address_prefix = "10.100.1.0/24"
gateway_sku_expressroute = "ErGw2AZ"
gateway_sku_vpn = "VpnGw3"
advanced_vpn_settings = {
enable_bgp = null
active_active = null
private_ip_address_allocation = ""
default_local_network_gateway_id = ""
vpn_client_configuration = []
bgp_settings = []
custom_route = []
}
}
}
azure_firewall = {
enabled = false
config = {
address_prefix = "10.100.0.0/24"
enable_dns_proxy = true
dns_servers = []
sku_tier = ""
base_policy_id = ""
private_ip_ranges = []
threat_intelligence_mode = ""
threat_intelligence_allowlist = []
availability_zones = {
zone_1 = true
zone_2 = true
zone_3 = true
}
}
}
spoke_virtual_network_resource_ids = []
enable_outbound_virtual_network_peering = false
enable_hub_network_mesh_peering = false
}
},
]
vwan_hub_networks = [
{
enabled = false
config = {
address_prefix = "10.200.0.0/22"
location = ""
sku = ""
routes = []
expressroute_gateway = {
enabled = false
config = {
scale_unit = 1
}
}
vpn_gateway = {
enabled = false
config = {
bgp_settings = []
routing_preference = ""
scale_unit = 1
}
}
azure_firewall = {
enabled = false
config = {
enable_dns_proxy = false
dns_servers = []
sku_tier = "Standard"
base_policy_id = ""
private_ip_ranges = []
threat_intelligence_mode = ""
threat_intelligence_allowlist = []
availability_zones = {
zone_1 = true
zone_2 = true
zone_3 = true
}
}
}
spoke_virtual_network_resource_ids = []
secure_spoke_virtual_network_resource_ids = []
enable_virtual_hub_connections = false
}
},
]
ddos_protection_plan = {
enabled = false
config = {
location = ""
}
}
dns = {
enabled = true
config = {
location = ""
enable_private_link_by_service = {
azure_api_management = true
azure_app_configuration_stores = true
azure_arc = true
azure_automation_dscandhybridworker = true
azure_automation_webhook = true
azure_backup = true
azure_batch_account = true
azure_bot_service_bot = true
azure_bot_service_token = true
azure_cache_for_redis = true
azure_cache_for_redis_enterprise = true
azure_container_registry = true
azure_cosmos_db_cassandra = true
azure_cosmos_db_gremlin = true
azure_cosmos_db_mongodb = true
azure_cosmos_db_sql = true
azure_cosmos_db_table = true
azure_data_explorer = true
azure_data_factory = true
azure_data_factory_portal = true
azure_data_health_data_services = true
azure_data_lake_file_system_gen2 = true
azure_database_for_mariadb_server = true
azure_database_for_mysql_server = true
azure_database_for_postgresql_server = true
azure_digital_twins = true
azure_event_grid_domain = true
azure_event_grid_topic = true
azure_event_hubs_namespace = true
azure_file_sync = true
azure_hdinsights = true
azure_iot_dps = true
azure_iot_hub = true
azure_key_vault = true
azure_key_vault_managed_hsm = true
azure_kubernetes_service_management = true
azure_machine_learning_workspace = true
azure_managed_disks = true
azure_media_services = true
azure_migrate = true
azure_monitor = true
azure_purview_account = true
azure_purview_studio = true
azure_relay_namespace = true
azure_search_service = true
azure_service_bus_namespace = true
azure_site_recovery = true
azure_sql_database_sqlserver = true
azure_synapse_analytics_dev = true
azure_synapse_analytics_sql = true
azure_synapse_studio = true
azure_web_apps_sites = true
azure_web_apps_static_sites = true
cognitive_services_account = true
microsoft_power_bi = true
signalr = true
signalr_webpubsub = true
storage_account_blob = true
storage_account_file = true
storage_account_queue = true
storage_account_table = true
storage_account_web = true
}
private_link_locations = []
public_dns_zones = []
private_dns_zones = []
enable_private_dns_zone_virtual_network_link_on_hubs = true
enable_private_dns_zone_virtual_network_link_on_spokes = true
virtual_network_resource_ids_to_link = []
}
}
}
}
}
variable "archetype_config_overrides" {
type = any
description = "If specified, will set custom Archetype configurations for the core ALZ Management Groups. Does not work for management groups specified by the 'custom_landing_zones' input variable."
default = {}
}
variable "subscription_id_overrides" {
type = map(list(string))
description = "If specified, will be used to assign subscription_ids to the default Enterprise-scale Management Groups."
default = {}
}
variable "subscription_id_connectivity" {
type = string
description = "If specified, identifies the Platform subscription for \"Connectivity\" for resource deployment and correct placement in the Management Group hierarchy."
default = ""
validation {
condition = can(regex("^[a-z0-9-]{36}$", var.subscription_id_connectivity)) || var.subscription_id_connectivity == ""
error_message = "Value must be a valid Subscription ID (GUID)."
}
}
variable "subscription_id_identity" {
type = string
description = "If specified, identifies the Platform subscription for \"Identity\" for resource deployment and correct placement in the Management Group hierarchy."
default = ""
validation {
condition = can(regex("^[a-z0-9-]{36}$", var.subscription_id_identity)) || var.subscription_id_identity == ""
error_message = "Value must be a valid Subscription ID (GUID)."
}
}
variable "subscription_id_management" {
type = string
description = "If specified, identifies the Platform subscription for \"Management\" for resource deployment and correct placement in the Management Group hierarchy."
default = ""
validation {
condition = can(regex("^[a-z0-9-]{36}$", var.subscription_id_management)) || var.subscription_id_management == ""
error_message = "Value must be a valid Subscription ID (GUID)."
}
}
variable "custom_landing_zones" {
type = any
description = "If specified, will deploy additional Management Groups alongside Enterprise-scale core Management Groups."
default = {}
validation {
condition = can([for k in keys(var.custom_landing_zones) : regex("^[a-zA-Z0-9-]{2,36}$", k)]) || length(keys(var.custom_landing_zones)) == 0
error_message = "The custom_landing_zones keys must be between 2 to 36 characters long and can only contain lowercase letters, numbers and hyphens."
}
}
variable "library_path" {
type = string
description = "If specified, sets the path to a custom library folder for archetype artefacts."
default = ""
}
variable "template_file_variables" {
type = any
description = "If specified, provides the ability to define custom template variables used when reading in template files from the built-in and custom library_path."
default = {}
}
variable "default_location" {
type = string
description = "If specified, will set the Azure region in which region bound resources will be deployed. Please see: https://azure.microsoft.com/en-gb/global-infrastructure/geographies/"
default = "eastus"
}
variable "default_tags" {
type = map(string)
description = "If specified, will set the default tags for all resources deployed by this module where supported."
default = {}
}
variable "disable_base_module_tags" {
type = bool
description = "If set to true, will remove the base module tags applied to all resources deployed by the module which support tags."
default = false
}
variable "create_duration_delay" {
type = object({
azurerm_management_group = optional(string, "30s")
azurerm_policy_assignment = optional(string, "30s")
azurerm_policy_definition = optional(string, "30s")
azurerm_policy_set_definition = optional(string, "30s")
azurerm_role_assignment = optional(string, "0s")
azurerm_role_definition = optional(string, "60s")
})
description = "Used to tune terraform apply when faced with errors caused by API caching or eventual consistency. Sets a custom delay period after creation of the specified resource type."
default = {
azurerm_management_group = "30s"
azurerm_policy_assignment = "30s"
azurerm_policy_definition = "30s"
azurerm_policy_set_definition = "30s"
azurerm_role_assignment = "0s"
azurerm_role_definition = "60s"
}
validation {
condition = can([for v in values(var.create_duration_delay) : regex("^[0-9]{1,6}(s|m|h)$", v)])
error_message = "The create_duration_delay values must be a string containing the duration in numbers (1-6 digits) followed by the measure of time represented by s (seconds), m (minutes), or h (hours)."
}
}
variable "destroy_duration_delay" {
type = object({
azurerm_management_group = optional(string, "0s")
azurerm_policy_assignment = optional(string, "0s")
azurerm_policy_definition = optional(string, "0s")
azurerm_policy_set_definition = optional(string, "0s")
azurerm_role_assignment = optional(string, "0s")
azurerm_role_definition = optional(string, "0s")
})
description = "Used to tune terraform deploy when faced with errors caused by API caching or eventual consistency. Sets a custom delay period after destruction of the specified resource type."
default = {
azurerm_management_group = "0s"
azurerm_policy_assignment = "0s"
azurerm_policy_definition = "0s"
azurerm_policy_set_definition = "0s"
azurerm_role_assignment = "0s"
azurerm_role_definition = "0s"
}
validation {
condition = can([for v in values(var.destroy_duration_delay) : regex("^[0-9]{1,6}(s|m|h)$", v)])
error_message = "The destroy_duration_delay values must be a string containing the duration in numbers (1-6 digits) followed by the measure of time represented by s (seconds), m (minutes), or h (hours)."
}
}
variable "custom_policy_roles" {
type = map(list(string))
description = "If specified, the custom_policy_roles variable overrides which Role Definition ID(s) (value) to assign for Policy Assignments with a Managed Identity, if the assigned \"policyDefinitionId\" (key) is included in this variable."
default = {}
}
variable "disable_telemetry" {
type = bool
description = "If set to true, will disable telemetry for the module. See https://aka.ms/alz-terraform-module-telemetry."
default = false
}
variable "strict_subscription_association" {
type = bool
description = "If set to true, subscriptions associated to management groups will be exclusively set by the module and any added by another process will be removed. If set to false, the module will will only enforce association of the specified subscriptions and those added to management groups by other processes will not be removed."
default = true
}