generated from Azure/terraform-azurerm-avm-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
752 lines (636 loc) · 21.8 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
variable "adou_path" {
type = string
description = "The Active Directory OU path."
}
variable "custom_location_name" {
type = string
description = "The name of the custom location."
}
variable "default_gateway" {
type = string
description = "The default gateway for the network."
}
variable "deployment_user" {
type = string
description = "The username for the domain administrator account."
}
variable "deployment_user_password" {
type = string
description = "The password for the domain administrator account."
sensitive = true
}
variable "dns_servers" {
type = list(string)
description = "A list of DNS server IP addresses."
nullable = false
}
# deploymentSettings related variables
variable "domain_fqdn" {
type = string
description = "The domain FQDN."
}
variable "ending_address" {
type = string
description = "The ending IP address of the IP address range."
}
variable "keyvault_name" {
type = string
description = "The name of the key vault."
}
variable "local_admin_password" {
type = string
description = "The password for the local administrator account."
sensitive = true
}
variable "local_admin_user" {
type = string
description = "The username for the local administrator account."
}
variable "location" {
type = string
description = "Azure region where the resource should be deployed."
nullable = false
}
variable "name" {
type = string
description = "The name of the HCI cluster. Must be the same as the name when preparing AD."
validation {
condition = var.cluster_name != "" || (length(var.name) < 16 && length(var.name) > 0)
error_message = "If 'cluster_name' is empty, 'name' must be between 1 and 16 characters."
}
validation {
condition = length(var.name) <= 40 && length(var.name) > 0
error_message = "value of name should be less than 40 characters and greater than 0 characters"
}
}
variable "resource_group_id" {
type = string
description = "The resource id of resource group."
}
variable "servers" {
type = list(object({
name = string
ipv4Address = string
}))
description = "A list of servers with their names and IPv4 addresses."
}
variable "service_principal_id" {
type = string
description = "The service principal ID for the Azure account."
}
variable "service_principal_secret" {
type = string
description = "The service principal secret for the Azure account."
}
variable "site_id" {
type = string
description = "A unique identifier for the site."
validation {
condition = can(regex("^[a-zA-Z0-9-]{1,8}$", var.site_id))
error_message = "value of site_id should be less than 9 characters and greater than 0 characters and only contain alphanumeric characters and hyphens, this is the requirement of name prefix in hci deploymentsetting"
}
}
variable "starting_address" {
type = string
description = "The starting IP address of the IP address range."
}
variable "account_replication_type" {
type = string
default = "ZRS"
description = "The replication type for the storage account."
}
variable "allow_nested_items_to_be_public" {
type = bool
default = false
description = "Indicates whether nested items can be public."
}
variable "azure_service_endpoint" {
type = string
default = "core.windows.net"
description = "The Azure service endpoint."
}
variable "azure_stack_lcm_user_credential_content_type" {
type = string
default = null
description = "(Optional) Content type of the azure stack lcm user credential."
}
variable "azure_stack_lcm_user_credential_expiration_date" {
type = string
default = null
description = "(Optional) Expiration date of the azure stack lcm user credential."
}
variable "azure_stack_lcm_user_credential_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the azure stack lcm user credential."
}
variable "bitlocker_boot_volume" {
type = bool
default = true
description = "When set to true, BitLocker XTS_AES 256-bit encryption is enabled for all data-at-rest on the OS volume of your Azure Stack HCI cluster. This setting is TPM-hardware dependent."
}
variable "bitlocker_data_volumes" {
type = bool
default = true
description = "When set to true, BitLocker XTS-AES 256-bit encryption is enabled for all data-at-rest on your Azure Stack HCI cluster shared volumes."
}
variable "cluster_name" {
type = string
default = ""
description = "The name of the HCI cluster."
validation {
condition = length(var.cluster_name) < 16 && length(var.cluster_name) >= 0
error_message = "The value of 'cluster_name' must be less than 16 characters"
}
}
variable "cluster_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the cluster."
}
variable "compute_intent_name" {
type = string
default = "ManagementCompute"
description = "The name of compute intent."
}
variable "compute_override_adapter_property" {
type = bool
default = true
description = "Indicates whether to override adapter property for compute."
}
variable "compute_override_qos_policy" {
type = bool
default = false
description = "Indicates whether to override qos policy for compute network."
}
variable "compute_qos_policy_overrides" {
type = object({
priorityValue8021Action_SMB = string
priorityValue8021Action_Cluster = string
bandwidthPercentage_SMB = string
})
default = {
priorityValue8021Action_SMB = ""
priorityValue8021Action_Cluster = ""
bandwidthPercentage_SMB = ""
}
description = "QoS policy overrides for network settings with required properties for compute."
}
variable "compute_rdma_enabled" {
type = bool
default = false
description = "Indicates whether RDMA is enabled for compute."
}
variable "compute_rdma_jumbo_packet" {
type = string
default = "9014"
description = "The jumbo packet size for RDMA of compute network."
}
variable "compute_rdma_protocol" {
type = string
default = "RoCEv2"
description = "The RDMA protocol of compute network."
}
variable "compute_traffic_type" {
type = list(string)
default = [
"Management",
"Compute"
]
description = "Traffic type of compute."
}
variable "configuration_mode" {
type = string
default = "Express"
description = "The configuration mode for the storage."
}
variable "create_hci_rp_role_assignments" {
type = bool
default = false
description = "Indicates whether to create role assignments for the HCI resource provider service principal."
}
variable "create_key_vault" {
type = bool
default = true
description = "Set to true to create the key vault, or false to skip it"
validation {
condition = !var.use_legacy_key_vault_model || var.create_key_vault
error_message = "create_key_vault must be true when use_legacy_key_vault_model is true."
}
}
variable "create_witness_storage_account" {
type = bool
default = true
description = "Set to true to create the witness storage account, or false to skip it"
}
variable "credential_guard_enforced" {
type = bool
default = false
description = "When set to true, Credential Guard is enabled on your Azure HCI cluster."
}
variable "cross_tenant_replication_enabled" {
type = bool
default = false
description = "Indicates whether cross-tenant replication is enabled."
}
variable "default_arb_application_content_type" {
type = string
default = null
description = "(Optional) Content type of the default arb application."
}
variable "default_arb_application_expiration_date" {
type = string
default = null
description = "(Optional) Expiration date of the default arb application."
}
variable "default_arb_application_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the default arb application."
}
variable "deployment_configuration_version" {
type = string
default = null
description = "The version of deployment configuration. Latest version will be used if not specified."
}
variable "drift_control_enforced" {
type = bool
default = true
description = "When set to true, the security baseline is re-applied regularly."
}
variable "drtm_protection" {
type = bool
default = true
description = "By default, Secure Boot is enabled on your Azure HCI cluster. This setting is hardware dependent."
}
variable "enable_telemetry" {
type = bool
default = true
description = <<DESCRIPTION
This variable controls whether or not telemetry is enabled for the module.
For more information see <https://aka.ms/avm/telemetryinfo>.
If it is set to false, then no telemetry will be collected.
DESCRIPTION
nullable = false
}
variable "eu_location" {
type = bool
default = false
description = "Indicates whether the location is in EU."
}
variable "hvci_protection" {
type = bool
default = true
description = "By default, Hypervisor-protected Code Integrity is enabled on your Azure HCI cluster."
}
variable "intent_name" {
type = string
default = "ManagementComputeStorage"
description = "The name of intent."
}
variable "is_exported" {
type = bool
default = false
description = "Indicate whether the resource is exported"
}
variable "key_vault_location" {
type = string
default = ""
description = "The location of the key vault."
}
variable "key_vault_resource_group" {
type = string
default = ""
description = "The resource group of the key vault."
}
variable "keyvault_purge_protection_enabled" {
type = bool
default = true
description = "Indicates whether purge protection is enabled."
}
variable "keyvault_secrets" {
type = list(object({
eceSecretName = string
secretSuffix = string
}))
default = []
description = "A list of key vault secrets."
validation {
condition = var.use_legacy_key_vault_model || length(var.keyvault_secrets) == 0 || (var.witness_type == null || var.witness_type == "" && length(var.keyvault_secrets) == 3) || (var.witness_type != null && var.witness_type != "" && length(var.keyvault_secrets) == 4)
error_message = "When use_legacy_key_vault_model is false and keyvault_secrets is provided, it must contain exactly 3 secrets (AzureStackLCMUserCredential, LocalAdminCredential, DefaultARBApplication) if witness_type is not specified (null or empty), or 4 secrets (including WitnessStorageKey) if witness_type is specified."
}
validation {
condition = var.use_legacy_key_vault_model || length(var.keyvault_secrets) == 0 || alltrue([for secret in var.keyvault_secrets : contains(["AzureStackLCMUserCredential", "LocalAdminCredential", "DefaultARBApplication", "WitnessStorageKey"], secret.eceSecretName)])
error_message = "keyvault_secrets must be provided when use_legacy_key_vault_model is false. EceSecretNames are AzureStackLCMUserCredential, LocalAdminCredential, DefaultARBApplication, WitnessStorageKey."
}
}
variable "keyvault_soft_delete_retention_days" {
type = number
default = 30
description = "The number of days that items should be retained for soft delete."
}
variable "keyvault_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the keyvault."
}
variable "local_admin_credential_content_type" {
type = string
default = null
description = "(Optional) Content type of the local admin credential."
}
variable "local_admin_credential_expiration_date" {
type = string
default = null
description = "(Optional) Expiration date of the local admin credential."
}
variable "local_admin_credential_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the local admin credential."
}
variable "lock" {
type = object({
kind = string
name = optional(string, null)
})
default = null
description = <<DESCRIPTION
Controls the Resource Lock configuration for this resource. The following properties can be specified:
- `kind` - (Required) The type of lock. Possible values are `\"CanNotDelete\"` and `\"ReadOnly\"`.
- `name` - (Optional) The name of the lock. If not specified, a name will be generated based on the `kind` value. Changing this forces the creation of a new resource.
DESCRIPTION
validation {
condition = var.lock != null ? contains(["CanNotDelete", "ReadOnly"], var.lock.kind) : true
error_message = "The lock level must be one of: 'None', 'CanNotDelete', or 'ReadOnly'."
}
}
variable "management_adapters" {
type = list(string)
default = []
description = "A list of management adapters."
nullable = false
}
variable "min_tls_version" {
type = string
default = "TLS1_2"
description = "The minimum TLS version."
}
variable "naming_prefix" {
type = string
default = ""
description = "The naming prefix in HCI deployment settings. Site id will be used if not provided."
}
variable "operation_type" {
type = string
default = "ClusterProvisioning"
description = "The intended operation for a cluster."
validation {
condition = contains(["ClusterProvisioning", "ClusterUpgrade"], var.operation_type == null ? "ClusterProvisioning" : var.operation_type)
error_message = "operation_type must be either 'ClusterProvisioning' or 'ClusterUpgrade'."
}
}
variable "override_adapter_property" {
type = bool
default = true
description = "Indicates whether to override adapter property."
}
variable "override_qos_policy" {
type = bool
default = false
description = "Indicates whether to override qos policy for converged network."
}
variable "qos_policy_overrides" {
type = object({
priorityValue8021Action_SMB = string
priorityValue8021Action_Cluster = string
bandwidthPercentage_SMB = string
})
default = {
priorityValue8021Action_SMB = ""
priorityValue8021Action_Cluster = ""
bandwidthPercentage_SMB = ""
}
description = "QoS policy overrides for network settings with required properties."
}
variable "random_suffix" {
type = bool
default = true
description = "Indicate whether to add random suffix"
}
variable "rdma_enabled" {
type = bool
default = false
description = "Enables RDMA when set to true. In a converged network configuration, this will make the network use RDMA. In a dedicated storage network configuration, enabling this will enable RDMA on the storage network."
}
variable "rdma_jumbo_packet" {
type = string
default = "9014"
description = "The jumbo packet size for RDMA of converged network."
}
variable "rdma_protocol" {
type = string
default = "RoCEv2"
description = "The RDMA protocol of converged network."
}
variable "resource_group_location" {
type = string
default = ""
description = "The location of resource group."
}
variable "role_assignments" {
type = map(object({
role_definition_id_or_name = string
principal_id = string
description = optional(string, null)
skip_service_principal_aad_check = optional(bool, false)
condition = optional(string, null)
condition_version = optional(string, null)
delegated_managed_identity_resource_id = optional(string, null)
principal_type = optional(string, null)
}))
default = {}
description = <<DESCRIPTION
A map of role assignments to create on this resource. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.
- `role_definition_id_or_name` - The ID or name of the role definition to assign to the principal.
- `principal_id` - The ID of the principal to assign the role to.
- `description` - The description of the role assignment.
- `skip_service_principal_aad_check` - If set to true, skips the Azure Active Directory check for the service principal in the tenant. Defaults to false.
- `condition` - The condition which will be used to scope the role assignment.
- `condition_version` - The version of the condition syntax. Valid values are '2.0'.
> Note: only set `skip_service_principal_aad_check` to true if you are assigning a role to a service principal.
DESCRIPTION
nullable = false
}
variable "rp_service_principal_object_id" {
type = string
default = ""
description = "The object ID of the HCI resource provider service principal."
}
variable "secrets_location" {
type = string
default = ""
description = "Secrets location for the deployment."
}
variable "side_channel_mitigation_enforced" {
type = bool
default = true
description = "When set to true, all the side channel mitigations are enabled."
}
variable "smb_cluster_encryption" {
type = bool
default = false
description = "When set to true, cluster east-west traffic is encrypted."
}
variable "smb_signing_enforced" {
type = bool
default = true
description = "When set to true, the SMB default instance requires sign in for the client and server services."
}
variable "storage_adapter_ip_info" {
type = map(list(object({
physicalNode = string
ipv4Address = string
subnetMask = string
})))
default = null
description = "The IP information for the storage networks. Key is the storage network name."
}
variable "storage_connectivity_switchless" {
type = bool
default = false
description = "Indicates whether storage connectivity is switchless."
}
variable "storage_intent_name" {
type = string
default = "Storage"
description = "The name of storage intent."
}
variable "storage_networks" {
type = list(object({
name = string
networkAdapterName = string
vlanId = string
}))
default = []
description = "A list of storage networks."
}
variable "storage_override_adapter_property" {
type = bool
default = true
description = "Indicates whether to override adapter property for storage network."
}
variable "storage_override_qos_policy" {
type = bool
default = false
description = "Indicates whether to override qos policy for storage network."
}
variable "storage_qos_policy_overrides" {
type = object({
priorityValue8021Action_SMB = string
priorityValue8021Action_Cluster = string
bandwidthPercentage_SMB = string
})
default = {
priorityValue8021Action_SMB = ""
priorityValue8021Action_Cluster = ""
bandwidthPercentage_SMB = ""
}
description = "QoS policy overrides for network settings with required properties for storage."
}
variable "storage_rdma_enabled" {
type = bool
default = false
description = "Indicates whether RDMA is enabled for storage. Storage RDMA will be enabled if either rdma_enabled or storage_rdma_enabled is set to true."
}
variable "storage_rdma_jumbo_packet" {
type = string
default = "9014"
description = "The jumbo packet size for RDMA of storage network."
}
variable "storage_rdma_protocol" {
type = string
default = "RoCEv2"
description = "The RDMA protocol of storage network."
}
variable "storage_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the storage."
}
variable "storage_traffic_type" {
type = list(string)
default = [
"Storage"
]
description = "Traffic type of storage."
}
variable "subnet_mask" {
type = string
default = "255.255.255.0"
description = "The subnet mask for the network."
}
variable "tenant_id" {
type = string
default = ""
description = "(Optional) Value of the tenant id"
}
variable "traffic_type" {
type = list(string)
default = [
"Management",
"Compute",
"Storage"
]
description = "Traffic type of intent."
}
variable "use_legacy_key_vault_model" {
type = bool
default = false
description = "Indicates whether to use the legacy key vault model."
}
variable "wdac_enforced" {
type = bool
default = true
description = "WDAC is enabled by default and limits the applications and the code that you can run on your Azure Stack HCI cluster."
}
variable "witness_path" {
type = string
default = "Cloud"
description = "The path to the witness."
}
variable "witness_storage_account_name" {
type = string
default = ""
description = "The name of the witness storage account."
# Validation rule to ensure the variable is provided if witness_type is "Cloud"
validation {
condition = lower(var.witness_type) != "cloud" || (lower(var.witness_type) == "cloud" && var.witness_storage_account_name != "")
error_message = "The 'witness_storage_account_name' must be provided when 'witness_type' is set to 'Cloud'."
}
}
variable "witness_storage_account_resource_group_name" {
type = string
default = ""
description = "The resource group of the witness storage account. If not provided, 'resource_group_name' will be used as the storage account's resource group."
}
variable "witness_storage_key_content_type" {
type = string
default = null
description = "(Optional) Content type of the witness storage key."
}
variable "witness_storage_key_expiration_date" {
type = string
default = null
description = "(Optional) Expiration date of the witness storage key."
}
variable "witness_storage_key_tags" {
type = map(string)
default = null
description = "(Optional) Tags of the witness storage key."
}
variable "witness_type" {
type = string
default = "Cloud"
description = "The type of the witness."
}