-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
1924 lines (1908 loc) · 58.7 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
variable "num_instances" {
description = "Number of VMs to provision"
default = "1"
type = string
}
variable "name_prefix" {
description = "Prefix for naming convention of VMs"
default = "vm"
type = string
}
variable "cores_count_type" {
description = "Nano, micro, mmall, medium, large, xl or xxl count of cores."
default = "small"
type = string
validation {
condition = var.cores_count_type == "nano" || var.cores_count_type == "micro" || var.cores_count_type == "small" || var.cores_count_type == "medium" || var.cores_count_type == "large" || var.cores_count_type == "xl" || var.cores_count_type == "xxl" || var.cores_count_type == "xxxl" || var.cores_count_type == "xxxxl"
error_message = "Cores count must be nano, micro, small, medium, large, xl or xxl."
}
}
variable "num_cores" {
description = "Number of CPUs for VMs in cluster"
default = {
nano = 1
micro = 1
small = 1
medium = 2
large = 2
xl = 4
xxl = 8
xxxl = 16
xxxxl = 32
}
}
variable "mem_size_type" {
description = "Nano, micro, mmall, medium, large, xl or xxl memory size."
default = "small"
type = string
validation {
condition = var.mem_size_type == "nano" || var.mem_size_type == "micro" || var.mem_size_type == "small" || var.mem_size_type == "medium" || var.mem_size_type == "large" || var.mem_size_type == "xl" || var.mem_size_type == "xxl" || var.mem_size_type == "xxxl" || var.mem_size_type == "xxxxl"
error_message = "Memory size type must be nano, micro, small, medium, large, xl or xxl."
}
}
variable "mem_size" {
description = "Amount of memory to be applied to VM(s)"
default = {
nano = "512"
micro = "1024"
small = "2048"
medium = "4096"
large = "8192"
xl = "16384"
xxl = "32768"
xxxl = "65536"
xxxxl = "131072"
}
}
variable "disk_size_type" {
description = "Nano, micro, mmall, medium, large, xl or xxl disk size."
default = "small"
type = string
validation {
condition = var.disk_size_type == "nano" || var.disk_size_type == "micro" || var.disk_size_type == "small" || var.disk_size_type == "medium" || var.disk_size_type == "large" || var.disk_size_type == "xl" || var.disk_size_type == "xxl" || var.disk_size_type == "xxxl" || var.disk_size_type == "xxxxl" || var.disk_size_type == "xxxxxl"
error_message = "Disk size type must be nano, micro, small, medium, large, xl or xxl."
}
}
variable "disk_size" {
description = "Size of drive (GB) to be applied to VM(s)"
default = {
nano = 10
micro = 20
small = 35
medium = 70
large = 120
xl = 240
xxl = 480
xxxl = 1024
xxxxl = 2048
xxxxxl = 4096
}
}
variable "ip_address" {
description = "IP address to use on one network"
type = string
default = ""
}
variable "ip_addresses" {
description = "IP addresses of VMs to create, empty string for DHCP"
type = list(string)
default = null
}
#### vSphere Vars ####
variable "vsphere_user" {
description = "vSphere administrator username"
type = string
default = "terraform-vsphere@vsphere.local"
sensitive = true
}
variable "vsphere_pass" {
description = "vSphere administrator password"
type = string
default = ""
sensitive = true
}
variable "vsphere_server" {
description = "vSphere server address"
type = string
default = ""
sensitive = true
}
variable "vsphere_datacenter" {
description = "vSphere datacenter"
default = ""
type = string
}
variable "vsphere_compute_cluster" {
description = "vSphere compute cluster"
default = ""
type = string
}
variable "vsphere_resource_pool" {
description = "vSphere resource pool"
default = ""
type = string
}
variable "vsphere_datastore" {
description = "vSphere datastore"
default = ""
type = string
}
variable "vsphere_network" {
description = "vSphere network"
default = ""
type = string
}
##TODO: Determine default folder
variable "vsphere_folder" {
description = "vSphere folder"
type = string
default = ""
}
variable "vsphere_template" {
description = "vSphere template for creating VM"
default = ""
type = string
}
variable "vsphere_tag_ids" {
description = "Tag IDs to apply to the VMs"
default = []
type = list(string)
}
##TODO: Determine default provisioned disks
variable "provisioned_disks" {
description = "Storage data disk parameter, example"
type = any
default = {}
}
variable "growr_provisioned_disks" {
description = "Storage data disk parameter, holding paramaters for provisioning with growr ansible role"
type = any
default = {}
}
variable "remote_exec_command" {
description = "Command for remote exec provisioner to run"
type = string
default = "echo Running the remote-exec provisioner"
}
variable "remote_exec_user" {
description = "User for remote exec provisioner to connect as"
type = string
default = "cicduser"
}
variable "remote_exec_ssh_key_file" {
description = "Path to the SSH key to connect to created VMs, located on the Terraform runner"
type = string
default = "/opt/devops-local/ssh/cicduser"
}
variable "remote_exec_timeout" {
description = "Timeout value for remote exec provisioner to connect to VM"
type = string
default = "1m"
}
variable "local_exec_user" {
description = "User for local exec provisioner to connect as with Ansible"
type = string
default = "cicduser"
}
variable "local_exec_ssh_key_file" {
description = "Path to the SSH key to connect to created VMs, located on the Terraform runner"
type = string
default = "/opt/devops-local/ssh/cicduser"
}
variable "path_to_ansible" {
description = "Location of Ansible playbook on Terraform runner"
type = string
default = "../../ansible-deployments/main.yml"
}
##TODO: Determine if this is needed
variable "provisioner_hostname_flag" {
description = "Flag to indicate if the two variables hostname and nomad_node_name should be supplied to the local-exec provisioner with the VM name"
type = string
default = "true"
validation {
condition = var.provisioner_hostname_flag == "true" || var.provisioner_hostname_flag == "false"
error_message = "Variable provisioner_hostname_flag must be true or false."
}
}
variable "ansible_python_interpreter" {
description = "Python interpreter to be used on target machine"
type = string
default = "/usr/bin/python3"
}
variable "consul_user" {
description = "vSphere Consul username"
type = string
sensitive = true
default = "consul"
}
variable "consul_manage_user" {
description = "Whether to create the user defined by consul_user or not"
type = string
sensitive = true
default = "True"
}
variable "consul_group" {
description = "Group for Consul"
type = string
default = "consul"
}
variable "consul_manage_group" {
description = "Whether to create the group defined by consul_group or not"
type = string
default = "true"
}
variable "consul_group_name" {
description = "Group name for Consul"
type = string
default = "all"
}
variable "consul_pass" {
description = "vSphere Consul password"
type = string
sensitive = true
default = ""
}
variable "consul_domain" {
description = "Domain for Consul DNS"
type = string
default = "consul."
}
variable "consul_node_meta" {
description = "Consul node meta data (key-value)"
type = map(string)
default = {}
}
variable "consul_cloud_autodiscovery" {
description = "Consul cloud auto discovery enabled/disabled flag"
type = string
default = "True"
}
variable "consul_cloud_autodiscovery_tag_category" {
description = "VMware VM tag category to use in Consul cloud auto discovery string"
type = string
default = "vmTags"
}
variable "consul_cloud_autodiscovery_tag_name" {
description = "VMware VM tag name to use in Consul cloud auto discovery string"
type = string
default = "consul"
}
## TLS Vars ##
variable "consul_tls_enable" {
description = "Consul gossip key"
type = string
sensitive = true
default = "True"
}
variable "consul_tls_ca_crt" {
description = "Consul CA certificate file name"
type = string
sensitive = true
default = "consul-agent-ca.pem"
}
variable "consul_tls_server_crt" {
description = "Consul CA Server certificate file name"
type = string
sensitive = true
default = ""
}
variable "consul_tls_server_key" {
description = "Consul CA Server Key file name"
type = string
sensitive = true
default = ""
}
variable "consul_src_def" {
description = "Default source directory for TLS files"
type = string
default = "/opt/devops-local/ssl/certs"
}
variable "consul_tls_src_files" {
description = "User-specified source directory for TLS files"
type = string
default = "/opt/devops-local/ssl/certs"
}
variable "consul_tls_verify_incoming" {
description = "Verify incoming Gossip connections"
type = string
default = "False"
}
variable "consul_tls_verify_outgoing" {
description = "Verify outgoing Gossip connections"
type = string
default = "True"
}
variable "consul_tls_verify_server_hostname" {
description = "Verify server hostname"
type = string
default = "True"
}
variable "consul_tls_min_version" {
description = "Minimum acceptable TLS version"
type = string
default = "tls12"
}
variable "consul_tls_cipher_suites" {
description = "Comma-separated list of supported ciphersuites"
type = string
default = ""
}
variable "consul_tls_prefer_server_cipher_suites" {
description = "Prefer server's cipher suite over client cipher suite"
type = string
default = ""
}
variable "auto_encrypt" {
description = "auto_encrypt"
type = map(any)
default = { "enabled" = "True" }
}
##TODO: Determine if should be True
variable "consul_tls_verify_incoming_rpc" {
description = "Verify incoming connections on RPC endpoints (client certificates)"
type = string
default = "False"
}
##TODO: Determine if should be True
variable "consul_tls_verify_incoming_https" {
description = "Verify incoming connections on HTTPS endpoints (client certificates)"
type = string
default = "False"
}
## Encrypt Vars ##
variable "consul_encrypt_enable" {
description = "Enable Gossip Encryption"
type = string
default = "True"
}
variable "consul_encrypt_verify_incoming" {
description = "Verify incoming Gossip connections"
type = string
default = "True"
}
variable "consul_encrypt_verify_outgoing" {
description = "Verify outgoing Gossip connections"
type = string
default = "True"
}
variable "consul_disable_keyring_file" {
description = "If set, the keyring will not be persisted to a file. Any installed keys will be lost on shutdown, and only the given -encrypt key will be available on startup."
type = string
default = "False"
}
##TODO: Source from Vault?
variable "consul_raw_key" {
description = "Consul gossip key"
type = string
sensitive = true
default = ""
}
variable "consul_node_role" {
description = "The Consul role of the node, one of: bootstrap, server, or client"
type = string
default = "client"
}
variable "consul_bootstrap_expect" {
description = "Boolean that adds bootstrap_expect value on Consul servers's config file"
type = string
default = "false"
}
variable "consul_bootstrap_expect_value" {
description = "Integer to define the minimum number of consul servers joined to the cluster in order to elect the leader"
type = number
default = 3
}
variable "consul_connect_enabled" {
description = "Enable Consul Connect feature"
type = string
default = "True"
}
variable "consul_syslog_enable" {
description = "Log to syslog as defined in enable_syslog or -syslog"
type = string
default = "True"
}
variable "consul_install_remotely" {
description = "Whether to download the files for installation directly on the remote hosts"
type = string
default = "False"
}
variable "consul_install_upgrade" {
description = "Whether to upgrade consul when a new version is specified"
type = string
default = "False"
}
variable "consul_ui" {
description = "Enable the consul ui"
type = string
default = "True"
}
variable "consul_ui_legacy" {
description = "Enable legacy consul ui mode"
type = string
default = "False"
}
variable "consul_disable_update_check" {
description = "Disable the consul update check"
type = string
default = "False"
}
variable "consul_enable_script_checks" {
description = "Enable script based checks"
type = string
default = "True"
}
variable "consul_enable_local_script_checks" {
description = "Enable script based checks"
type = number
default = 3
}
variable "consul_raft_protocol" {
description = "Raft protocol to use"
type = string
default = "3"
}
variable "consul_version" {
description = "Version to install"
type = string
default = "1.11.4"
}
//variable "consul_architecture_map" {
// description = "Dictionary for translating ansible_architecture values to Go architecture values naming convention"
// type = string
// default = "dict"
//}
//variable "consul_architecture" {
// description = "System architecture as determined by {{ consul_architecture_map[ansible_architecture] }}"
// type = string
// default = "amd64"
//}
variable "consul_bin_path" {
description = "Binary installation path"
type = string
default = "/usr/local/bin"
}
variable "consul_config_path" {
description = "Base configuration file path"
type = string
default = "/etc/consul"
}
variable "consul_data_path" {
description = "Data directory path as defined in data_dir or -data-dir"
type = string
default = "/var/consul"
}
variable "consul_configure_syslogd" {
description = "Enable configuration of rsyslogd or syslog-ng on Linux. If disabled, Consul will still log to syslog if consul_syslog_enable is true, but the syslog daemon won't be configured to write Consul logs to their own logfile"
type = string
default = "False"
}
##TODO: Determine if defaults should be set for log path and log file
variable "consul_log_path" {
description = ""
type = string
default = "/var/log/consul"
}
variable "consul_log_file" {
description = ""
type = string
default = "consul.log"
}
variable "consul_log_level" {
description = "Log level as defined in log_level or -log-level"
type = string
default = "INFO"
}
variable "consul_log_rotate_bytes" {
description = "Log rotate bytes as defined in log_rotate_bytes or -log-rotate-bytes"
type = number
default = 0
}
variable "consul_log_rotate_duration" {
description = "Log rotate bytes as defined in log_rotate_duration or -log-rotate-duration"
type = string
default = "24h"
}
variable "consul_log_rotate_max_files" {
description = "Log rotate bytes as defined in log_rotate_max_files or -log-rotate-max-files"
type = number
default = 0
}
variable "consul_syslog_facility" {
description = "Syslog facility as defined in syslog_facility"
type = string
default = "local0"
}
variable "syslog_user" {
description = "Owner of rsyslogd process on Linux. consul_log_path's ownership is set to this user on Linux. Ignored if consul_configure_syslogd is false"
type = string
default = "syslog"
}
variable "syslog_group" {
description = "Group of user running rsyslogd process on Linux. consul_log_path's group ownership is set to this group on Linux. Ignored if consul_configure_syslogd is false"
type = string
default = "adm"
}
variable "consul_run_path" {
description = "Run path for process identifier (PID) file"
type = string
default = "/run/consul"
}
variable "consul_retry_interval" {
description = "Interval for reconnection attempts to LAN servers"
type = string
default = "30s"
}
variable "consul_retry_interval_wan" {
description = "Interval for reconnection attempts to WAN servers"
type = string
default = "30s"
}
variable "consul_retry_join_skip_hosts" {
description = "If true, the config value for retry_join won't be populated by the default hosts servers. The value can be initialized using consul_join"
type = string
default = "False"
}
variable "consul_retry_max" {
description = "Max reconnection attempts to LAN servers before failing (0 = infinite)"
type = number
default = 0
}
variable "consul_retry_max_wan" {
description = "Max reconnection attempts to WAN servers before failing (0 = infinite)"
type = number
default = 0
}
## ACL Vars ##
variable "consul_acl_enable" {
description = "Enable ACLs"
type = string
default = "True"
}
variable "consul_acl_token" {
description = "Default ACL token, only set if provided"
type = string
default = ""
}
variable "consul_acl_default_policy" {
description = "Default ACL policy"
type = string
default = "deny"
}
variable "consul_acl_token_persistence" {
description = "Define if tokens set using the API will be persisted to disk or not"
type = string
default = "True"
}
variable "consul_datacenter" {
description = "ACL authoritative datacenter name"
type = string
default = ""
}
variable "consul_acl_down_policy" {
description = "Default ACL down policy"
type = string
default = "allow"
}
variable "consul_acl_agent_token" {
description = "Used for clients and servers to perform internal operations to the service catalog"
type = string
default = ""
}
variable "consul_acl_agent_master_token" {
description = "A special access token that has agent ACL policy write privileges on each agent where it is configured"
type = string
default = ""
}
variable "consul_acl_master_token" {
description = "ACL master token"
type = string
default = ""
}
variable "consul_acl_master_token_display" {
description = "Display generated ACL Master Token"
type = string
default = ""
}
##TODO: Determine how to handle this - required in non-Troy (primary) datacenters
variable "consul_acl_replication_token" {
description = "ACL replication token"
type = string
default = ""
}
variable "consul_addresses_http" {
description = ""
type = string
default = "127.0.0.1 {{ consul_bind_address }}"
}
variable "consul_ports" {
description = ""
type = map(any)
default = { "grpc" = "8502", "dns" = "8600", "http" = "8500", "https" = "8501", "rpc" = "8400", "serf_lan" = "8301", "serf_wan" = "8302", "server" = "8300" }
}
variable "consul_dnsmasq_enable" {
description = "Whether to install and configure DNS API forwarding on port 53 using DNSMasq"
type = string
default = "True"
}
variable "consul_dnsmasq_servers" {
description = "Upstream DNS servers used by dnsmasq"
type = list(string)
default = []
}
variable "consul_dnsmasq_revservers" {
description = "Reverse lookup subnets"
type = list(string)
default = []
}
variable "consul_iptables_enable" {
description = "Whether to enable iptables rules for DNS forwarding to Consul"
type = string
default = "False"
}
##TODO: Determine if should be Infoblox
variable "consul_recursors" {
description = "List of upstream DNS servers"
type = list(any)
default = ["10.254.203.31", "10.254.203.32", "10.254.203.33"]
}
## Autopilot Vars ##
##TODO: Add to main.tf after acquiring Enterprise
variable "consul_autopilot_enable" {
description = "Enable Autopilot config"
type = string
default = "False"
}
variable "consul_autopilot_cleanup_dead_Servers" {
description = "Dead servers will periodically be cleaned up and removed from the Raft peer set"
type = string
default = "False"
}
variable "consul_autopilot_last_contact_threshold" {
description = "Sets the threshold for time since last contact"
type = string
default = "200ms"
}
variable "consul_autopilot_max_trailing_logs" {
description = "Used in the serf health check to set a max-number of log entries nodes can trail the leader"
type = string
default = "250"
}
variable "consul_autopilot_server_stabilization_time" {
description = "Time to allow a new node to stabilize"
type = string
default = "10s"
}
variable "consul_autopilot_redundancy_zone_tag" {
description = "Override with CONSUL_AUTOPILOT_REDUNDANCY_ZONE_TAG environment variable"
type = string
default = "az"
}
variable "consul_autopilot_disable_upgrade_migration" {
description = "Override with CONSUL_AUTOPILOT_DISABLE_UPGRADE_MIGRATION environment variable"
type = string
default = "False"
}
variable "consul_autopilot_upgrade_version_tag" {
description = "Override with CONSUL_AUTOPILOT_UPGRADE_VERSION_TAG environment variable"
type = string
default = ""
}
variable "consul_debug" {
description = "Enables the generation of additional config files in the Consul config directory for debug purpose"
type = string
default = "False"
}
variable "consul_config_custom" {
type = any
default = {
"telemetry" = {
"prometheus_retention_time" = "30s"
}
}
}
#### Docker Vars ####
variable "docker_daemon_options" {
description = ""
type = any
default = {
"metrics-addr" = "0.0.0.0:9323"
"experimental" = true
}
}
#### Nomad Vars ####
variable "nomad_debug" {
description = "Nomad debug mode"
type = string
default = "no"
}
variable "nomad_skip_ensure_all_hosts" {
description = "Allow running the role even if not all instances are connected"
type = string
default = "no"
}
variable "nomad_allow_purge_config" {
description = "Allow purging obsolete configuration files. For example, remove server configuration if instance is no longer a server"
type = string
default = "no"
}
variable "nomad_version" {
description = ""
type = string
default = "1.2.6"
}
variable "nomad_bin_dir" {
description = "Nomad binary installation path"
type = string
default = "/usr/local/bin"
}
variable "nomad_config_dir" {
description = "Nomad configuration file path"
type = string
default = "/etc/nomad.d"
}
variable "nomad_data_dir" {
description = "Nomad data path"
type = string
default = "/opt/nomad"
}
variable "nomad_lockfile" {
description = "Nomad lockfile path"
type = string
default = "/var/lock/subsys/nomad"
}
variable "nomad_run_dir" {
description = "Nomad run path"
type = string
default = "/var/run/nomad"
}
variable "nomad_manage_user" {
description = "Manage Nomad user"
type = string
default = "no"
}
variable "nomad_user" {
description = "Nomad OS username"
type = string
default = "root"
}
variable "nomad_user_uid" {
description = "Nomad user's uid"
type = string
default = "4646"
}
variable "nomad_manage_group" {
description = "Manage Nomad group"
type = string
default = "no"
}
variable "nomad_group" {
description = "Nomad OS group"
type = string
default = "bin"
}
variable "nomad_group_gid" {
description = "Nomad group's gid"
type = string
default = "4646"
}
variable "nomad_region" {
description = "Default region"
type = string
default = ""
}
variable "nomad_datacenter" {
description = "Nomad datacenter label"
type = string
default = "tmi-w01-dc01"
}
variable "nomad_log_level" {
description = "Logging level"
type = string
default = "INFO"
}
variable "nomad_syslog_enable" {
description = "Log to syslog"
type = string
default = "True"
}
variable "nomad_node_role" {
description = "Nomad node role - server, client or both"
type = string
default = "client"
}
variable "nomad_leave_on_terminate" {
description = ""
type = string
default = "yes"
}
variable "nomad_leave_on_interrupt" {
description = ""
type = string
default = "yes"
}
variable "nomad_disable_update_check" {
description = "Disable update check"
type = string
default = "no"
}
variable "nomad_retry_max" {
description = "Max retry join attempts"
type = number
default = 0
}
variable "nomad_retry_join" {
description = "Enable retry join"
type = string
default = "no"
}
variable "nomad_retry_interval" {
description = "Retry join interval"
type = string
default = "30s"
}
variable "nomad_rejoin_after_leave" {
description = "Rejoin after leave"
type = string
default = "no"
}
variable "nomad_enabled_schedulers" {
description = "List of enabled schedulers"
type = list(string)
default = ["service", "batch", "system"]
}
variable "nomad_node_gc_threshold" {
description = "Node garbage collection threshold"
type = string
default = "24h"
}
variable "nomad_job_gc_threshold" {
description = "Job garbage collection threshold"
type = string
default = "4h"
}
variable "nomad_eval_gc_threshold" {
description = "Eval garbage collection threshold"
type = string
default = "1h"
}
variable "nomad_deployment_gc_threshold" {
description = "Deployment garbage collection threshold"
type = string
default = "1h"
}
variable "nomad_encrypt_enable" {
description = "Enable Gossip Encryption even if nomad_encrypt is not set"
type = string
default = "False"
}
##TODO: Source from Vault
variable "nomad_encrypt" {
description = "Set the encryption key; should be the same across a cluster. If not present and nomad_encrypt_enable is true, the key will be generated & retrieved from the bootstrapped server."
type = string
default = ""
}
variable "nomad_raft_protocol" {
description = "Specifies the version of raft protocal, which used by nomad servers for communication."
type = number
default = 2
}
variable "nomad_authoritative_region" {
description = "Specifies the authoritative region, which provides a single source of truth for global configurations such as ACL Policies and global ACL tokens"
type = string
default = "tmi"
}
variable "nomad_node_class" {
description = "Nomad node class"
type = string
default = "feature"
}
variable "nomad_no_host_uuid" {
description = "Force the UUID generated by the client to be randomly generated"
type = string
default = "no"
}
variable "nomad_max_kill_timeout" {
description = "Max kill timeout"
type = string
default = "30s"
}
variable "nomad_network_interface" {
description = "Nomad scheduler will choose from the IPs of this interface for allocating tasks"
type = string
default = ""
}
variable "nomad_network_speed" {
description = "Overide network link speed (0 = no overide)"
type = number
default = 0
}
variable "nomad_cpu_total_compute" {
description = "Overide cpu compute (0 = no overide)"
type = number
default = 0
}
variable "nomad_gc_interval" {
description = "Client garbage collection interval"
type = string
default = "1m"
}
variable "nomad_gc_disk_usage_threshold" {
description = "Disk usage threshold percentage for garbage collection"
type = number
default = 80
}
variable "nomad_gc_inodes_usage_threshold" {
description = "Inode usage threshold percentage for garbage collection"
type = number
default = 70
}
variable "nomad_gc_parallel_destroys" {
description = "Inode usage threshold percentage for garbage collection"
type = number
default = 2
}
variable "nomad_reserved_cpu" {
description = "Reserved client CPU"
type = number
default = 0
}
variable "nomad_reserved_memory" {
description = "Reserved client memory"
type = number
default = 0
}
variable "nomad_reserved_disk" {
description = "Reserved client memory"
type = number
default = 0
}
variable "nomad_reserved_ports" {
description = "Reserved client ports"
type = number
default = 22
}
variable "nomad_host_folder" {
description = "create folder for nomad host volume"
type = any
default = {}
}
variable "nomad_host_volumes" {
description = "Storage data disk parameter, example"
type = any
default = {}
}
variable "nomad_options" {
description = ""
type = map(any)
default = {
"driver.raw_exec.enable" = "1"
"driver.java.enable" = "0"
"docker.cleanup.image" = "false"
"docker.volumes.enabled" = "true"
}
}
variable "nomad_meta" {
description = "Meta data"
type = map(any)
default = {
"node-switcher" = "on"
"purpose" = "ops"
}
}
variable "nomad_ports_http" {
description = "Http port"
type = number
default = 4646