-
Notifications
You must be signed in to change notification settings - Fork 88
/
variables.tf
1123 lines (952 loc) · 36.2 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
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Azure related variables
variable "az_region" {
description = "Azure region where the deployment machines will be created"
type = string
default = "westeurope"
}
variable "resource_group_name" {
description = "Already existing resource group where the infrastructure is created. If it's not set a new one will be created named rg-ha-sap-{{var.deployment_name/terraform.workspace}}"
type = string
default = ""
}
variable "vnet_name" {
description = "Already existing virtual network name used by the created infrastructure. If it's not set a new one will be created named vnet-{{var.deployment_name/terraform.workspace}}"
type = string
default = ""
}
variable "vnet_address_range" {
description = "vnet address range in CIDR notation (only used if the vnet is created by terraform or the user doesn't have read permissions in this resource. To use the current vnet address range set the value to an empty string)"
type = string
default = "10.74.0.0/16"
validation {
condition = (
can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.vnet_address_range))
)
error_message = "Invalid IP range format. It must be something like: 102.168.10.5/24 ."
}
}
variable "subnet_name" {
description = "Already existing subnet name used by the created infrastructure. If it's not set a new one will be created named snet-{{var.deployment_name/terraform.workspace}}"
type = string
default = ""
}
variable "subnet_address_range" {
description = "subnet address range in CIDR notation (only used if the subnet is created by terraform or the user doesn't have read permissions in this resource. To use the current vnet address range set the value to an empty string)"
type = string
default = ""
validation {
condition = (
var.subnet_address_range == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.subnet_address_range))
)
error_message = "Invalid IP range format. It must be something like: 102.168.10.5/24 ."
}
}
variable "subnet_netapp_name" {
description = "Already existing subnet name used by the created infrastructure. If it's not set a new one will be created named snet-{{var.deployment_name/terraform.workspace}}"
type = string
default = ""
}
variable "subnet_netapp_address_range" {
description = "subnet address range in CIDR notation (only used if the subnet is created by terraform or the user doesn't have read permissions in this resource. To use the current vnet address range set the value to an empty string)"
type = string
default = ""
validation {
condition = (
var.subnet_netapp_address_range == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.subnet_netapp_address_range))
)
error_message = "Invalid IP range format. It must be something like: 102.168.10.5/24 ."
}
}
variable "storage_account_name" {
description = "Azure storage account name where HANA installation software is available"
type = string
}
variable "storage_account_key" {
description = "Azure storage account secret key"
type = string
}
variable "public_key" {
description = "Content of a SSH public key or path to an already existing SSH public key. The key is only used to provision the machines and it is authorized for future accesses"
type = string
}
variable "private_key" {
description = "Content of a SSH private key or path to an already existing SSH private key. The key is only used to provision the machines. It is not uploaded to the machines in any case"
type = string
}
variable "authorized_keys" {
description = "List of additional authorized SSH public keys content or path to already existing SSH public keys to access the created machines with the used admin user (admin_user variable in this case)"
type = list(string)
default = []
}
variable "admin_user" {
description = "User used to connect to machines and bastion"
type = string
default = "sles"
}
variable "bastion_name" {
description = "hostname, without the domain part"
type = string
default = "vmbastion"
}
variable "bastion_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "bastion_enabled" {
description = "Create a VM to work as a bastion to avoid the usage of public ip addresses and manage the ssh connection to the other machines"
type = bool
default = true
}
variable "bastion_os_image" {
description = "sles4sap image used to create the bastion machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "bastion_public_key" {
description = "Content of a SSH public key or path to an already existing SSH public key to the bastion. If it's not set the key provided in public_key will be used"
type = string
default = ""
}
variable "bastion_private_key" {
description = "Content of a SSH private key or path to an already existing SSH private key to the bastion. If it's not set the key provided in private_key will be used"
type = string
default = ""
}
# Deployment variables
variable "deployment_name" {
description = "Suffix string added to some of the infrastructure resources names. If it is not provided, the terraform workspace string is used as suffix"
type = string
default = ""
}
variable "deployment_name_in_hostname" {
description = "Add deployment_name as a prefix to all hostnames."
type = bool
default = false
}
variable "network_domain" {
description = "hostname's network domain for all hosts. Can be overwritten by modules."
type = string
default = "tf.local"
}
variable "os_image" {
description = "Default OS image for all the machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: 'SUSE:sles-sap-15-sp4:gen2:latest'. This value is not used if the specific nodes os_image is set (e.g. hana_os_image)"
type = string
default = "SUSE:sles-sap-15-sp4:gen2:latest"
}
variable "timezone" {
description = "Timezone setting for all VMs"
default = "Europe/Berlin"
}
variable "cluster_ssh_pub" {
description = "Path to a SSH public key used during the cluster creation. The key must be passwordless"
type = string
}
variable "cluster_ssh_key" {
description = "Path to a SSH private key used during the cluster creation. The key must be passwordless"
type = string
}
variable "reg_code" {
description = "If informed, register the product using SUSEConnect"
type = string
default = ""
}
variable "reg_email" {
description = "Email used for the registration"
default = ""
}
# The module format must follow SUSEConnect convention:
# <module_name>/<product_version>/<architecture>
# Example: Suggested modules for SLES for SAP 15
# - sle-module-basesystem/15/x86_64
# - sle-module-desktop-applications/15/x86_64
# - sle-module-server-applications/15/x86_64
# - sle-ha/15/x86_64 (Need the same regcode as SLES for SAP)
# - sle-module-sap-applications/15/x86_64
variable "reg_additional_modules" {
description = "Map of the modules to be registered. Module name = Regcode, when needed."
type = map(string)
default = {}
}
variable "additional_packages" {
description = "Extra packages to be installed"
default = []
}
# Repository url used to install development versions of HA/SAP deployment packages
# The latest RPM packages can be found at:
# https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel/{YOUR SLE VERSION}
# Contains the salt formulas rpm packages.
variable "ha_sap_deployment_repo" {
description = "Repository url used to install development versions of HA/SAP deployment packages. If the SLE version is not present in the URL, it will be automatically detected"
type = string
default = "https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:v9"
}
variable "provisioner" {
description = "Used provisioner option. Available options: salt. Let empty to not use any provisioner"
default = "salt"
}
variable "provisioning_log_level" {
description = "Provisioning process log level. For salt: https://docs.saltstack.com/en/latest/ref/configuration/logging/index.html"
type = string
default = "error"
}
variable "background" {
description = "Run the provisioner execution in background if set to true finishing terraform execution"
type = bool
default = false
}
variable "provisioning_output_colored" {
description = "Print colored output of the provisioning execution"
type = bool
default = true
}
# Hana related variables
variable "hana_name" {
description = "hostname, without the domain part"
type = string
default = "vmhana"
}
variable "hana_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "hana_count" {
description = "Number of hana nodes"
type = string
default = "2"
}
variable "hana_os_image" {
description = "sles4sap image used to create the HANA machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "sles4sap_uri" {
description = "Path to a custom azure image in a storage account used to create the hana machines"
type = string
default = ""
}
# For reference:
# Standard_M32ls has 32 VCPU, 256GiB RAM, 1000 GiB SSD
# You could find other supported instances in Azure documentation
variable "hana_vm_size" {
description = "VM size for the hana machine"
type = string
default = "Standard_E4s_v3"
}
variable "hana_majority_maker_vm_size" {
description = "VM size for the HANA Majority Maker machine"
type = string
default = "Standard_D2s_v3"
}
variable "hana_data_disks_configuration" {
type = map(any)
default = {
disks_type = "Premium_LRS,Premium_LRS,Premium_LRS,Premium_LRS,Premium_LRS,Premium_LRS,Premium_LRS"
disks_size = "128,128,128,128,64,64,128"
caching = "None,None,None,None,None,None,None"
writeaccelerator = "false,false,false,false,false,false,false"
# The next variables are used during the provisioning
luns = "0,1#2,3#4#5#6"
names = "data#log#shared#usrsap#backup"
lv_sizes = "100#100#100#100#100"
paths = "/hana/data#/hana/log#/hana/shared#/usr/sap#/hana/backup"
}
description = <<EOF
This map describes how the disks will be formatted to create the definitive configuration during the provisioning.
disks_type, disks_size, caching and writeaccelerator are used during the disks creation.
"," is used to separate each disk.
disk_type = The disk type used to create disks. See https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd and https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/managed_disk for reference.
disk_size = The disk size in GB.
caching = Sets the disk caching (None, ReadOnly, ReadWrite).
writeaccelerator = Enable Write Accelerator (false/true, depends on disk_type).
"#" character is used to split the volume groups, while "," is used to define the logical volumes for each group
The number of groups split by "#" must match in all of the entries.
luns -> The luns or disks used for each volume group. The number of luns must match with the configured in the previous disks variables. Striped logical volumes will be created for each volume group split by "#" (example 0,1#2,3#4#5#6).
names -> The names of the volume groups (example data#log#shared#usrsap#backup)
sizes -> The size dedicated for each logical volume and folder (example 50#50#100#100#100)
paths -> Folder where each volume group will be mounted (example /hana/data#/hana/log#/hana/shared#/usr/sap#/hana/backup)
EOF
}
variable "hana_enable_accelerated_networking" {
description = "Enable accelerated networking. This function is mandatory for certified HANA environments and are not available for all kinds of instances. Check https://docs.microsoft.com/en-us/azure/virtual-network/create-vm-accelerated-networking-cli for more details"
type = bool
default = false
}
variable "hana_ips" {
description = "ip addresses to set to the hana nodes. If it's not set the addresses will be auto generated from the provided vnet address range"
type = list(string)
default = []
validation {
condition = (
can([for v in var.hana_ips : regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", v)])
)
error_message = "Invalid IP address format."
}
}
variable "hana_majority_maker_ip" {
description = "ip address to set to the HANA Majority Maker node. If it's not set the addresses will be auto generated from the provided vnet address range"
type = string
default = ""
validation {
condition = (
var.hana_majority_maker_ip == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.hana_majority_maker_ip))
)
error_message = "Invalid IP address format."
}
}
variable "hana_inst_master" {
description = "Azure storage account path where hana installation software is available"
type = string
}
variable "hana_inst_folder" {
description = "Folder where the hana installation software will be downloaded"
type = string
default = "/sapmedia/HANA"
}
variable "hana_platform_folder" {
description = "Path to the hana platform media, relative to the 'hana_inst_master' mounting point"
type = string
default = ""
}
variable "hana_sapcar_exe" {
description = "Path to the sapcar executable, relative to the 'hana_inst_master' mounting point. Only needed if HANA installation software comes in a SAR file (like IMDB_SERVER.SAR)"
type = string
default = ""
}
variable "hana_archive_file" {
description = "Path to the HANA database server installation SAR archive (for SAR files, `hana_sapcar_exe` variable is mandatory) or HANA platform archive file in ZIP or RAR (EXE) format, relative to the 'hana_inst_master' mounting point. Use this parameter if the HANA media archive is not already extracted"
type = string
default = ""
}
variable "hana_extract_dir" {
description = "Absolute path to folder where SAP HANA archive will be extracted. This folder cannot be the same as `hana_inst_folder`!"
type = string
default = "/sapmedia_extract/HANA"
}
variable "hana_client_folder" {
description = "Path to the extracted HANA Client folder, relative to the 'hana_inst_master' mounting point"
type = string
default = ""
}
variable "hana_client_archive_file" {
description = "Path to the HANA Client SAR archive , relative to the 'hana_inst_master' mounting point. Use this parameter if the HANA Client archive is not already extracted"
type = string
default = ""
}
variable "hana_client_extract_dir" {
description = "Absolute path to folder where SAP HANA Client archive will be extracted"
type = string
default = "/sapmedia_extract/HANA_CLIENT"
}
variable "hana_fstype" {
description = "Filesystem type used by the disk where hana is installed"
type = string
default = "xfs"
}
variable "hana_sid" {
description = "System identifier of the HANA system. It must be a 3 characters string (check the restrictions in the SAP documentation pages). Examples: PRD, HA1"
type = string
default = "PRD"
}
variable "hana_cost_optimized_sid" {
description = "System identifier of the HANA cost-optimized system. It must be a 3 characters string (check the restrictions in the SAP documentation pages). Examples: PRD, HA1"
type = string
default = "QAS"
}
variable "hana_instance_number" {
description = "Instance number of the HANA system. It must be a 2 digits string. Examples: 00, 01, 10"
type = string
default = "00"
}
variable "hana_cost_optimized_instance_number" {
description = "Instance number of the HANA cost-optimized system. It must be a 2 digits string. Examples: 00, 01, 10"
type = string
default = "01"
}
variable "hana_master_password" {
description = "Master password for the HANA system (sidadm user included)"
type = string
}
variable "hana_cost_optimized_master_password" {
description = "Master password for the HANA system (sidadm user included)"
type = string
default = ""
}
variable "hana_primary_site" {
description = "HANA system replication primary site name"
type = string
default = "Site1"
}
variable "hana_secondary_site" {
description = "HANA system replication secondary site name"
type = string
default = "Site2"
}
variable "hana_cluster_vip" {
description = "Virtual ip for the hana cluster. If it's not set the address will be auto generated from the provided vnet address range"
type = string
default = ""
validation {
condition = (
var.hana_cluster_vip == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.hana_cluster_vip))
)
error_message = "Invalid IP address format."
}
}
variable "hana_cluster_fencing_mechanism" {
description = "Select the HANA cluster fencing mechanism. Options: sbd, native"
type = string
default = "sbd"
validation {
condition = (
can(regex("^(sbd|native)$", var.hana_cluster_fencing_mechanism))
)
error_message = "Invalid HANA cluster fencing mechanism. Options: sbd|native ."
}
}
variable "hana_ha_enabled" {
description = "Enable HA cluster in top of HANA system replication"
type = bool
default = true
}
variable "hana_active_active" {
description = "Enable an Active/Active HANA system replication setup"
type = bool
default = false
}
variable "hana_cluster_vip_secondary" {
description = "IP address used to configure the hana cluster floating IP for the secondary node in an Active/Active mode. Let empty to use an auto generated address"
type = string
default = ""
validation {
condition = (
var.hana_cluster_vip_secondary == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.hana_cluster_vip_secondary))
)
error_message = "Invalid IP address format."
}
}
variable "hana_extra_parameters" {
type = map(any)
default = {}
description = <<EOF
This map allows to add any extra parameters to the HANA installation (inside the installation configfile).
For more details about the parameters, have a look at the Parameter Reference, e.g.
https://help.sap.com/docs/SAP_HANA_PLATFORM/2c1988d620e04368aa4103bf26f17727/c16432a77b6144dcb75aace2b4fcacff.html
Some examples:
hana_extra_parameters = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}
variable "scenario_type" {
description = "Deployed scenario type. Available options: performance-optimized, cost-optimized"
default = "performance-optimized"
}
variable "hana_scale_out_enabled" {
description = "Enable HANA scale out deployment"
type = bool
default = false
}
variable "hana_scale_out_shared_storage_type" {
description = "Storage type to use for HANA scale out deployment"
type = string
default = ""
validation {
condition = (
can(regex("^(|anf)$", var.hana_scale_out_shared_storage_type))
)
error_message = "Invalid HANA scale out storage type. Options: anf."
}
}
variable "hana_scale_out_addhosts" {
type = map(any)
default = {}
description = <<EOF
Additional hosts to pass to HANA scale-out installation
EOF
}
variable "hana_scale_out_standby_count" {
description = "Number of HANA scale-out standby nodes to be deployed per site"
type = number
default = "0"
}
variable "hana_ha_dr_sustkover_enabled" {
description = "enable susTkOver hook"
type = bool
default = false
}
variable "hana_ha_dr_suschksrv_enabled" {
description = "enable susChkSrv hook"
type = bool
default = false
}
variable "hana_ha_dr_suschksrv_action_on_lost" {
description = "define action on lost for susChkSrv, see `man 7 susChkSrv.py`"
type = string
default = "stop"
}
# SBD related variables
# In order to enable SBD, an ISCSI server is needed as right now is the unique option
# All the clusters will use the same mechanism
variable "sbd_storage_type" {
description = "Choose the SBD storage type. Options: iscsi"
type = string
default = "iscsi"
validation {
condition = (
can(regex("^(iscsi)$", var.sbd_storage_type))
)
error_message = "Invalid SBD storage type. Options: iscsi ."
}
}
# If iscsi is selected as sbd_storage_type
# Use the next variables for advanced configuration
variable "iscsi_name" {
description = "hostname, without the domain part"
type = string
default = "vmiscsi"
}
variable "iscsi_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "iscsi_os_image" {
description = "sles4sap image used to create the ISCSI machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "iscsi_srv_uri" {
description = "Path to a custom azure image in a storage account used to create the iscsi machines"
type = string
default = ""
}
variable "iscsi_vm_size" {
description = "VM size for the iscsi server machine"
type = string
default = "Standard_DS1_v2"
}
variable "iscsi_srv_ip" {
description = "iscsi server address. If it's not set the address will be auto generated from the provided vnet address range"
type = string
default = ""
validation {
condition = (
var.iscsi_srv_ip == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.iscsi_srv_ip))
)
error_message = "Invalid IP address format."
}
}
variable "iscsi_lun_count" {
description = "Number of LUN (logical units) to serve with the iscsi server. Each LUN can be used as a unique sbd disk"
default = 3
}
variable "iscsi_disk_size" {
description = "Disk size in GB used to create the LUNs and partitions to be served by the ISCSI service"
type = number
default = 10
}
# Monitoring related variables
variable "monitoring_name" {
description = "hostname, without the domain part"
type = string
default = "vmmonitoring"
}
variable "monitoring_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "monitoring_enabled" {
description = "Enable the host to be monitored by exporters, e.g node_exporter"
type = bool
default = false
}
variable "monitoring_vm_size" {
description = "VM size for the monitoring machine"
type = string
default = "Standard_D2s_v3"
}
variable "monitoring_os_image" {
description = "sles4sap image used to create the Monitoring server machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "monitoring_uri" {
description = "Path to a custom azure image in a storage account used to create the monitoring machines"
type = string
default = ""
}
variable "monitoring_srv_ip" {
description = "monitoring server address. If it's not set the address will be auto generated from the provided vnet address range"
type = string
default = ""
validation {
condition = (
var.monitoring_srv_ip == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.monitoring_srv_ip))
)
error_message = "Invalid IP address format."
}
}
# DRBD related variables
variable "drbd_name" {
description = "hostname, without the domain part"
type = string
default = "vmdrbd"
}
variable "drbd_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "drbd_enabled" {
description = "Enable the DRBD cluster for nfs"
type = bool
default = false
}
variable "drbd_vm_size" {
description = "VM size for the DRBD machine"
type = string
default = "Standard_D2s_v3"
}
variable "drbd_ips" {
description = "ip addresses to set to the drbd cluster nodes. If it's not set the addresses will be auto generated from the provided vnet address range"
type = list(string)
default = []
}
variable "drbd_os_image" {
description = "sles4sap image used to create the DRBD machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "drbd_image_uri" {
description = "Path to a custom azure image in a storage account used to create the drbd machines"
type = string
default = ""
}
variable "drbd_cluster_vip" {
description = "Virtual ip for the drbd cluster. If it's not set the address will be auto generated from the provided vnet address range"
type = string
default = ""
validation {
condition = (
var.drbd_cluster_vip == "" || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.drbd_cluster_vip))
)
error_message = "Invalid IP address format."
}
}
variable "drbd_cluster_fencing_mechanism" {
description = "Select the DRBD cluster fencing mechanism. Options: sbd, native"
type = string
default = "sbd"
validation {
condition = (
can(regex("^(sbd|native)$", var.drbd_cluster_fencing_mechanism))
)
error_message = "Invalid DRBD cluster fencing mechanism. Options: sbd|native ."
}
}
variable "drbd_nfs_mounting_point" {
description = "Mounting point of the NFS share created in to of DRBD (`/mnt` must not be used in Azure)"
type = string
default = "/mnt_permanent/sapdata"
}
# Netweaver related variables
variable "netweaver_name" {
description = "hostname, without the domain part"
type = string
default = "vmnetweaver"
}
variable "netweaver_network_domain" {
description = "hostname's network domain"
type = string
default = ""
}
variable "netweaver_enabled" {
description = "Enable SAP Netweaver cluster deployment"
type = bool
default = false
}
variable "netweaver_app_server_count" {
description = "Number of PAS/AAS servers (1 PAS and the rest will be AAS). 0 means that the PAS is installed in the same machines as the ASCS"
type = number
default = 2
}
variable "netweaver_os_image" {
description = "sles4sap image used to create the Netweaver machines. Composed by 'Publisher:Offer:Sku:Version' syntax. Example: SUSE:sles-sap-15-sp4:gen2:latest"
type = string
default = ""
}
variable "netweaver_image_uri" {
description = "Path to a custom azure image in a storage account used to create the netweaver machines"
type = string
default = ""
}
variable "netweaver_xscs_vm_size" {
description = "VM size for the Netweaver xSCS machines"
type = string
default = "Standard_D2s_v3"
}
variable "netweaver_app_vm_size" {
description = "VM size for the Netweaver application servers"
type = string
default = "Standard_D2s_v3"
}
variable "netweaver_data_disk_type" {
description = "Disk type of the disks used to store netweaver content in the application servers"
type = string
default = "Premium_LRS"
}
variable "netweaver_data_disk_size" {
description = "Size of the netweaver data disks in the application servers, informed in GB"
type = string
default = "128"
}
variable "netweaver_data_disk_caching" {
description = "Disk caching of the disks used to store netweaver content in the application servers"
type = string
default = "ReadWrite"
}
variable "netweaver_xscs_accelerated_networking" {
description = "Enable accelerated networking for netweaver xSCS machines"
type = bool
default = false
}
variable "netweaver_app_accelerated_networking" {
description = "Enable accelerated networking for netweaver application server machines"
type = bool
default = false
}
variable "netweaver_ips" {
description = "ip addresses to set to the netweaver cluster nodes. If it's not set the addresses will be auto generated from the provided vnet address range"
type = list(string)
default = []
validation {
condition = (
can([for v in var.netweaver_ips : regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", v)])
)
error_message = "Invalid IP address format."
}
}
variable "netweaver_virtual_ips" {
description = "Virtual ip addresses to set to the netweaver cluster nodes. If it's not set the addresses will be auto generated from the provided vnet address range"
type = list(string)
default = []
validation {
condition = (
can([for v in var.netweaver_virtual_ips : regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", v)])
)
error_message = "Invalid IP address format."
}
}
variable "netweaver_sid" {
description = "System identifier of the Netweaver installation (e.g.: HA1 or PRD)"
type = string
default = "HA1"
}
variable "netweaver_ascs_instance_number" {
description = "Instance number of the ASCS system. It must be a 2 digits string. Examples: 00, 01, 10"
type = string
default = "00"
}
variable "netweaver_ers_instance_number" {
description = "Instance number of the ERS system. It must be a 2 digits string. Examples: 00, 01, 10"
type = string
default = "10"
}
variable "netweaver_pas_instance_number" {
description = "Instance number of the PAS system. It must be a 2 digits string. Examples: 00, 01, 10"
type = string
default = "01"
}
variable "netweaver_master_password" {
description = "Master password for the Netweaver system (sidadm user included)"
type = string
default = ""
}
variable "netweaver_cluster_fencing_mechanism" {
description = "Select the Netweaver cluster fencing mechanism. Options: sbd, native"
type = string
default = "sbd"
validation {
condition = (
can(regex("^(native|sbd)$", var.netweaver_cluster_fencing_mechanism))
)
error_message = "Invalid Netweaver cluster fending mechanism. Options: native|sbd ."
}
}
variable "netweaver_nfs_share" {
description = "URL of the NFS share where /sapmnt and /usr/sap/{sid}/SYS will be mounted. This folder must have the sapmnt and usrsapsys folders. This parameter can be omitted if drbd_enabled is set to true, as a HA nfs share will be deployed by the project. Finally, if it is not used or set empty, these folders are created locally (for single machine deployments)"
type = string
default = ""
}
variable "netweaver_sapmnt_path" {
description = "Path where sapmnt folder is stored"
type = string
default = "/sapmnt"
}
variable "netweaver_storage_account_name" {
description = "Azure storage account where SAP Netweaver installation files are stored"
type = string
default = ""
}
variable "netweaver_storage_account_key" {
description = "Azure storage account access key"
type = string
default = ""
}
variable "netweaver_storage_account" {
description = "Azure storage account path"
type = string
default = ""
}
variable "netweaver_product_id" {
description = "Netweaver installation product. Even though the module is about Netweaver, it can be used to install other SAP instances like S4/HANA"
type = string
default = "NW750.HDB.ABAPHA"
}
variable "netweaver_inst_folder" {
description = "Folder where SAP Netweaver installation files are mounted"
type = string
default = "/sapmedia/NW"
}
variable "netweaver_extract_dir" {
description = "Extraction path for Netweaver media archives of SWPM and netweaver additional dvds"
type = string
default = "/sapmedia_extract/NW"
}
variable "netweaver_swpm_folder" {
description = "Netweaver software SWPM folder, path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_sapcar_exe" {
description = "Path to sapcar executable, relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_swpm_sar" {
description = "SWPM installer sar archive containing the installer, path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_sapexe_folder" {
description = "Software folder where needed sapexe `SAR` executables are stored (sapexe, sapexedb, saphostagent), path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_additional_dvds" {
description = "Software folder with additional SAP software needed to install netweaver (NW export folder and HANA HDB client for example), path relative from the `netweaver_inst_media` mounted point"
type = list(any)
default = []
}
variable "netweaver_ha_enabled" {
description = "Enable HA cluster in top of Netweaver ASCS and ERS instances"
type = bool