-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
930 lines (779 loc) · 25.8 KB
/
variables.tf
File metadata and controls
930 lines (779 loc) · 25.8 KB
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
# ╺┳╸┏━┓┏━╸┏━┓
# ┃ ┣━┫┃╺┓┗━┓
# ╹ ╹ ╹┗━┛┗━┛
variable "db_instance_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the RDS instance."
}
variable "db_parameter_group_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the parameter group"
}
variable "db_subnet_group_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the parameter group"
}
variable "rds_extra_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the RDS instance"
}
variable "ebs_extra_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the EBS volumes"
}
variable "private_subnet_tags" {
type = map(any)
default = { Tier = "private" }
description = "The extra tags to be applied to the private subnets"
}
variable "public_subnet_tags" {
type = map(any)
default = { Tier = "public" }
description = "The extra tags to be applied to the public subnets"
}
variable "vpc_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the VPC"
}
variable "s3_clickhouse_backup_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the S3 clickhouse backup bucket"
}
variable "sg_tags" {
type = map(any)
default = {}
description = "The extra tags to be applied to the security group"
}
# ╻ ╻┏━┓┏━┓╻┏━┓┏┓ ╻ ┏━╸┏━┓
# ┃┏┛┣━┫┣┳┛┃┣━┫┣┻┓┃ ┣╸ ┗━┓
# ┗┛ ╹ ╹╹┗╸╹╹ ╹┗━┛┗━╸┗━╸┗━┛
# ┏━╸┏━┓┏┳┓┏┳┓┏━┓┏┓╻
# ┃ ┃ ┃┃┃┃┃┃┃┃ ┃┃┗┫
# ┗━╸┗━┛╹ ╹╹ ╹┗━┛╹ ╹
variable "deployment_name" {
type = string
description = "Name of the current deployment."
}
variable "environment" {
type = string
description = "Global environment tag to apply on all datadog logs, metrics, etc."
}
variable "redis_data_size" {
type = number
default = 50
description = "Redis EBS volume size in GB"
}
variable "az_index" {
type = number
default = 0
description = "Index of the availability zone"
}
variable "public_subnet_index" {
type = number
default = 0
description = "Index of the public subnet"
}
variable "private_subnet_index" {
type = number
default = 0
description = "Index of the private subnet"
}
variable "secondary_private_subnet_index" {
type = number
default = null
description = "Index of the private subnet for secondary node groups (grp4, grp5, grp6). If null, uses private_subnet_index."
}
variable "eks_cluster_subnet_count" {
type = number
default = null
description = "Number of private subnets to use for EKS cluster (control plane). If null, uses all private subnets. Set this to limit which subnets the EKS cluster uses while allowing node groups to use additional subnets."
}
variable "initial_apply_complete" {
type = bool
default = false
description = "Indicates if this infra is deployed or not. Helps to resolve dependencies."
}
# ┏━┓┏━┓┏━┓╻ ╻╻╺┳┓┏━╸┏━┓
# ┣━┛┣┳┛┃ ┃┃┏┛┃ ┃┃┣╸ ┣┳┛
# ╹ ╹┗╸┗━┛┗┛ ╹╺┻┛┗━╸╹┗╸
variable "provider_region" {
type = string
description = "The AWS region in which the infrastructure should be deployed"
}
variable "provider_azs" {
type = list(string)
default = []
description = "List of availability zones to consider. If empty, the modules will determine this dynamically."
}
# ╻ ╻┏━┓┏━╸
# ┃┏┛┣━┛┃
# ┗┛ ╹ ┗━╸
variable "vpc_id" {
type = string
default = ""
description = "The VPC ID of an existing VPC to deploy the cluster in. Creates a new VPC if not set."
}
variable "vpc_cidr" {
type = string
default = "10.0.0.0/16"
description = "The CIDR of the new VPC, if the vpc_cidr is not set"
validation {
condition = can(regex("^(?:(?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", var.vpc_cidr))
error_message = "Network CIDR must be a valid cidr."
}
}
variable "vpc_private_subnets" {
type = list(string)
default = ["10.0.0.0/24", "10.0.1.0/24"]
description = "The private subnet CIDR ranges when a new VPC is created."
validation {
condition = alltrue([
for cidr in var.vpc_private_subnets :
can(regex("^(?:(?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", cidr))
])
error_message = "Network CIDR must be a valid cidr."
}
}
variable "vpc_public_subnets" {
type = list(string)
default = ["10.0.100.0/24", "10.0.101.0/24"]
description = "The public network CIDR ranges"
validation {
condition = alltrue([
for cidr in var.vpc_public_subnets :
can(regex("^(?:(?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", cidr))
])
error_message = "Network CIDR must be a valid cidr."
}
}
variable "deploy_vpc_flow_logs" {
type = bool
default = false
description = "Activates the VPC flow logs if set."
}
variable "nat_gateway_public_ip" {
type = string
default = ""
description = "Public IP of the NAT gateway when reusing the NAT gateway instead of recreating"
}
variable "vpc_propagating_vgws" {
type = list(any)
default = []
description = "ID's of virtual private gateways to propagate."
}
variable "vpc_vpn_gateway_id" {
type = string
default = ""
description = "ID of the VPN gateway to attach to the VPC"
}
variable "propagate_intra_route_tables_vgw" {
type = bool
default = false
description = "If intra subnets should propagate traffic."
}
variable "propagate_private_route_tables_vgw" {
type = bool
default = false
description = "If private subnets should propagate traffic."
}
variable "propagate_public_route_tables_vgw" {
type = bool
default = false
description = "If public subnets should propagate traffic."
}
variable "dhcp_options_domain_name" {
type = string
default = ""
description = "Specifies DNS name for DHCP options set"
}
variable "dhcp_options_domain_name_servers" {
type = list(string)
default = ["AmazonProvidedDNS"]
description = "Specify a list of DNS server addresses for DHCP options set"
}
variable "enable_dhcp_options" {
type = bool
default = false
description = "Flag to use custom DHCP options for DNS resolution."
}
variable "dhcp_options_tags" {
type = map(string)
default = {}
description = "Tags applied to the DHCP options set."
}
variable "vpce_details" {
default = {}
type = map(object({
vpces_service_name = string
subnet_ids = optional(list(string), [])
private_dns_enabled = optional(bool, true)
input_rules = list(object({
description = string
from_port = number
to_port = number
protocol = string
cidr_blocks = string
}))
output_rules = list(object({
description = string
from_port = number
to_port = number
protocol = string
cidr_blocks = string
}))
}))
description = "Endpoint names to define with security group rule definitions"
}
variable "vpc_exclude_az_ids" {
type = list(string)
default = []
description = "AZ IDs to exclude from availability zones"
}
# ┏━┓┏━╸┏━╸╻ ╻┏━┓╻╺┳╸╻ ╻ ┏━╸┏━┓┏━┓╻ ╻┏━┓┏━┓
# ┗━┓┣╸ ┃ ┃ ┃┣┳┛┃ ┃ ┗┳┛ ┃╺┓┣┳┛┃ ┃┃ ┃┣━┛┗━┓
# ┗━┛┗━╸┗━╸┗━┛╹┗╸╹ ╹ ╹ ┗━┛╹┗╸┗━┛┗━┛╹ ┗━┛
variable "whitelisted_ingress_cidrs" {
type = list(string)
description = "List of CIDRs that can pass through the load balancer"
validation {
condition = alltrue([
for ip in var.whitelisted_ingress_cidrs :
can(regex("^((?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", ip))
])
error_message = "Network CIDR must be a valid cidr."
}
}
variable "whitelisted_egress_cidrs" {
type = list(string)
description = "List of Internet addresses the application can access going outside"
validation {
condition = alltrue([
for ip in var.whitelisted_egress_cidrs :
can(regex("^((?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", ip))
])
error_message = "Network CIDR must be a valid cidr."
}
}
variable "ingress_enable_http_sg" {
type = bool
default = false
description = "Whether regular HTTP traffic should be allowed to access the load balancer"
}
variable "dns_egress_cidrs" {
type = list(string)
description = "List of Internet addresses to which the application has access"
default = []
validation {
condition = alltrue([
for ip in var.dns_egress_cidrs :
can(regex("^((?:\\d{1,3}\\.?){4})\\/(\\d{1,2})$", ip))
])
error_message = "Network CIDR must be a valid cidr."
}
}
# ╻ ┏━┓┏━┓╺┳┓ ┏┓ ┏━┓╻ ┏━┓┏┓╻┏━╸┏━╸┏━┓
# ┃ ┃ ┃┣━┫ ┃┃╺━╸┣┻┓┣━┫┃ ┣━┫┃┗┫┃ ┣╸ ┣┳┛
# ┗━╸┗━┛╹ ╹╺┻┛ ┗━┛╹ ╹┗━╸╹ ╹╹ ╹┗━╸┗━╸╹┗╸
variable "create_ssl_cert" {
type = bool
description = "Creates an SSL certificate if set."
}
variable "lb_subnets_override" {
description = "Override subnets to deploy ALB into, otherwise use default logic."
type = list(string)
default = []
}
variable "alb_certificate_domain" {
type = string
description = <<-EOT
Pass a domain name like example.com to this variable in order to enable ALB HTTPS listeners.
Terraform will try to find AWS certificate that is issued and matches asked domain,
so please make sure that you have issued a certificate for asked domain already.
EOT
}
variable "host_override" {
type = string
default = ""
description = "Overrides the default domain name used to send links in invite emails and page links. Useful if the application is behind cloudflare for example."
}
variable "lb_internal" {
type = bool
default = false
description = "Set to true to make the load balancer internal and not exposed to the internet."
}
variable "lb_idle_timeout" {
type = number
default = 120
description = "The time in seconds that the connection is allowed to be idle."
}
variable "backend_app_port" {
type = number
default = 80
description = "The target port to use for the backend services"
}
variable "lb_deletion_protection" {
type = bool
default = true
description = "Flag if the load balancer can be deleted or not."
}
variable "lb_name_override" {
type = string
default = ""
description = "An optional override for the name of the load balancer"
}
variable "lb_access_logs" {
type = map(string)
default = {}
description = "Load balancer access logs configuration."
}
variable "lb_deploy_nlb" {
type = bool
default = false
description = "Flag if the network load balancer should be deployed (usually for incoming private link)."
}
variable "lb_nlb_internal" {
type = bool
default = true
description = "Set to true to make the load balancer internal and not exposed to the internet."
}
variable "lb_vpces_details" {
default = null
type = object({
allowed_principals = list(string)
private_dns_name = optional(string)
acceptance_required = bool
supported_ip_address_types = list(string)
})
description = "Endpoint service to define for internal traffic over private link"
}
variable "deploy_lb" {
type = bool
default = true
description = "Allows a deploy without a load balancer"
}
# ╺┳┓┏━┓╺┳╸┏━┓┏┓ ┏━┓┏━┓┏━╸
# ┃┃┣━┫ ┃ ┣━┫┣┻┓┣━┫┗━┓┣╸
# ╺┻┛╹ ╹ ╹ ╹ ╹┗━┛╹ ╹┗━┛┗━╸
variable "create_rds" {
type = bool
default = true
description = "Whether to create the RDS instance."
}
variable "rds_username" {
type = string
default = "datafold"
description = "Overrides the default RDS user name that is provisioned."
}
variable "rds_password_override" {
type = string
default = null
description = "Password override"
}
variable "rds_identifier" {
type = string
default = ""
description = "Name of the RDS instance"
}
variable "rds_instance" {
type = string
default = "db.t3.medium"
description = <<-EOT
EC2 insance type for PostgreSQL RDS database.
Available instance groups: t3, m4, m5, r6i, m6i
Available instance classes: medium and higher.
EOT
validation {
condition = can(regex("^db\\.(t3|m4|m5|r6i|m6i)\\..+$", var.rds_instance))
error_message = "Instance type for rds is not valid."
}
}
variable "rds_allocated_storage" {
type = number
default = 20
description = "The size of RDS allocated storage in GB"
}
variable "rds_max_allocated_storage" {
type = number
default = 100
description = "The upper limit the database can grow in GB"
}
variable "rds_backups_replication_target_region" {
type = string
default = null
description = "RDS backup replication target region"
}
variable "rds_backups_replication_retention_period" {
type = number
default = 14
description = "RDS backup replication retention period"
}
variable "rds_maintenance_window" {
type = string
default = "Mon:00:00-Mon:03:00"
description = "RDS maintenance window"
}
variable "rds_backup_window" {
type = string
default = "03:00-06:00"
description = "RDS backup window"
}
variable "rds_multi_az" {
type = bool
default = false
description = "RDS instance in multiple AZ's"
}
variable "create_rds_kms_key" {
type = bool
default = true
description = "Set to true to create a separate KMS key (Recommended)."
}
variable "rds_kms_key_alias" {
type = string
default = "datafold-rds"
description = "RDS KMS key alias."
}
variable "use_default_rds_kms_key" {
type = bool
default = false
description = "Flag weither or not to use the default RDS KMS encryption key. Not recommended."
}
variable "database_name" {
type = string
default = "datafold"
description = "RDS database name"
}
variable "db_subnet_group_name" {
type = string
default = ""
description = "The specific subnet group name to use"
}
variable "db_parameter_group_name" {
type = string
default = ""
description = "The specific parameter group name to associate"
}
variable "rds_ro_username" {
type = string
default = "datafold_ro"
description = "RDS read-only user name (not currently used)."
}
variable "rds_version" {
type = string
default = "17.9"
description = "Postgres RDS version to use."
}
variable "rds_port" {
type = number
default = 5432
description = "The port the RDS database should be listening on."
}
variable "rds_param_group_family" {
type = string
default = "postgres17"
description = "The DB parameter group family to use"
}
variable "apply_major_upgrade" {
type = bool
default = false
description = "Sets the flag to allow AWS to apply major upgrade on the maintenance plan schedule."
}
variable "rds_performance_insights_enabled" {
type = bool
default = false
description = "RDS performance insights enabled or not"
}
variable "rds_monitoring_role_arn" {
type = string
description = "The IAM role allowed to send RDS metrics to cloudwatch"
default = null
}
variable "db_extra_parameters" {
type = list(any)
default = []
description = "List of map of extra variables to apply to the RDS database parameter group"
}
variable "rds_copy_tags_to_snapshot" {
type = bool
default = false
description = "To copy tags to snapshot or not"
}
variable "rds_performance_insights_retention_period" {
type = number
default = 7
description = "RDS performance insights retention period"
}
variable "rds_auto_minor_version_upgrade" {
type = bool
default = false
description = "Sets a flag to upgrade automatically all minor versions"
}
variable "rds_monitoring_interval" {
type = number
default = 0
description = "RDS monitoring interval"
}
# ┏━╸╻ ╻┏━╸╻┏ ╻ ╻┏━┓╻ ╻┏━┓┏━╸
# ┃ ┃ ┃┃ ┣┻┓┣━┫┃ ┃┃ ┃┗━┓┣╸
# ┗━╸┗━╸╹┗━╸╹ ╹╹ ╹┗━┛┗━┛┗━┛┗━╸
variable "clickhouse_s3_bucket" {
type = string
default = "clickhouse-backups-abcguo23"
description = "Bucket where clickhouse backups are stored"
}
variable "clickhouse_data_size" {
type = number
default = 40
description = "EBS volume size for clickhouse data in GB"
}
variable "clickhouse_logs_size" {
type = number
default = 40
description = "EBS volume size for clickhouse logs in GB"
}
variable "ebs_type" {
type = string
default = "gp3"
description = "Type for all EBS volumes"
}
variable "ch_data_ebs_iops" {
type = number
default = 3000
description = "IOPS of EBS volume"
}
variable "ch_data_ebs_throughput" {
type = number
default = 1000
description = "Throughput of EBS volume"
}
variable "ch_logs_ebs_iops" {
type = number
default = 3000
description = "IOPS of EBS volume"
}
variable "ch_logs_ebs_throughput" {
type = number
default = 250
description = "Throughput of EBS volume"
}
variable "s3_backup_bucket_name_override" {
type = string
default = ""
description = "Bucket name override."
}
variable "backup_lifecycle_expiration_days" {
type = number
default = 6
description = "Number of days after which clickhouse backup objects will expire and be deleted."
}
# ┏━┓┏━╸╺┳┓╻┏━┓
# ┣┳┛┣╸ ┃┃┃┗━┓
# ╹┗╸┗━╸╺┻┛╹┗━┛
variable "redis_ebs_iops" {
type = number
default = 3000
description = "IOPS of EBS redis volume"
}
variable "redis_ebs_throughput" {
type = number
default = 125
description = "Throughput of EBS redis volume"
}
# ┏━╸╻┏ ┏━┓
# ┣╸ ┣┻┓┗━┓
# ┗━╸╹ ╹┗━┛
variable "k8s_module_version" {
type = string
default = "~> 19.7"
description = "EKS terraform module version"
}
variable "k8s_cluster_version" {
type = string
default = "1.35"
description = "Ref. https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html"
}
variable "self_managed_node_grp_instance_type" {
type = string
default = "THe instance type for the self managed node group."
description = "Ref. https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt"
}
variable "self_managed_node_grps" {
type = any
default = {}
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/self-managed-node-group"
}
variable "managed_node_grp1" {
type = any
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "managed_node_grp2" {
type = any
default = null
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "managed_node_grp3" {
type = any
default = null
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "managed_node_grp4" {
type = any
default = null
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "managed_node_grp5" {
type = any
default = null
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "managed_node_grp6" {
type = any
default = null
description = "Ref. https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group"
}
variable "default_node_disk_size" {
type = number
default = 40
description = "Disk size for a node in GB"
}
variable "tags" {
type = any
default = {}
description = "Tags to apply to the general module"
}
variable "k8s_public_access_cidrs" {
type = list(string)
description = "List of CIDRs that are allowed to connect to the EKS control plane"
}
variable "k8s_api_access_roles" {
type = set(string)
default = []
description = "Set of roles that are allowed to access the EKS API"
}
# ┏━┓┏━┓╻╻ ╻┏━┓╺┳╸┏━╸ ┏━┓┏━╸┏━╸┏━╸┏━┓┏━┓
# ┣━┛┣┳┛┃┃┏┛┣━┫ ┃ ┣╸ ┣━┫┃ ┃ ┣╸ ┗━┓┗━┓
# ╹ ╹┗╸╹┗┛ ╹ ╹ ╹ ┗━╸╺━╸╹ ╹┗━╸┗━╸┗━╸┗━┛┗━┛
variable "deploy_private_access" {
type = bool
default = false
description = "Determines that the cluster should be 100% private"
}
variable "allowed_principals" {
type = list(string)
default = []
description = "List of allowed principals allowed to connect to this endpoint."
}
variable "vpn_cidr" {
type = string
description = "CIDR range for administrative access"
default = ""
}
# ┏┓ ┏━╸╺┳┓┏━┓┏━┓┏━╸╻┏
# ┣┻┓┣╸ ┃┃┣┳┛┃ ┃┃ ┣┻┓
# ┗━┛┗━╸╺┻┛╹┗╸┗━┛┗━╸╹ ╹
variable "k8s_access_bedrock" {
type = bool
default = false
description = "Allow cluster to access bedrock in this region"
}
variable "service_account_prefix" {
type = string
default = ""
description = "Prefix for service account names to match Helm chart naming (e.g., 'datafold-' for 'datafold-server', or '' for no prefix)"
}
# ┏━╸╻╺┳╸╻ ╻╻ ╻┏┓ ┏━┓┏━╸╻ ╻┏━╸┏━┓┏━┓┏━╸ ┏━┓┏━┓┏━┓╻ ╻╻ ╻
# ┃╺┓┃ ┃ ┣━┫┃ ┃┣┻┓ ┣┳┛┣╸ ┃┏┛┣╸ ┣┳┛┗━┓┣╸ ┣━┛┣┳┛┃ ┃┏╋┛┗┳┛
# ┗━┛╹ ╹ ╹ ╹┗━┛┗━┛ ╹┗╸┗━╸┗┛ ┗━╸╹┗╸┗━┛┗━╸ ╹ ╹┗╸┗━┛╹ ╹ ╹
variable "deploy_github_reverse_proxy" {
type = bool
default = false
description = "Determines that the github reverse proxy should be deployed"
}
variable "github_cidrs" {
type = list(string)
default = []
description = "List of CIDRs that are allowed to connect to the github reverse proxy"
}
variable "monitor_lambda_datadog" {
description = "Whether to monitor the Lambda with Datadog"
type = bool
default = false
}
variable "datadog_api_key" {
description = "The API key for Datadog"
type = string
default = ""
sensitive = true
}
# ╻ ╻┏━┓┏━╸ ┏━┓┏━╸┏━╸┏━┓╻┏┓╻┏━╸
# ┃┏┛┣━┛┃ ┣━┛┣╸ ┣╸ ┣┳┛┃┃┗┫┃╺┓
# ┗┛ ╹ ┗━╸ ╹ ┗━╸┗━╸╹┗╸╹╹ ╹┗━┛
variable "deploy_vpc_peering" {
type = bool
default = false
description = "Determines that the VPC peering should be deployed"
}
variable "peer_vpc_id" {
type = string
default = ""
description = "The VPC ID to peer with"
}
variable "peer_vpc_cidr_block" {
type = string
default = ""
description = "The CIDR block of the peer VPC"
}
variable "peer_vpc_additional_whitelisted_ingress_cidrs" {
type = set(string)
default = []
description = "List of CIDRs that can pass through the load balancer"
}
variable "peer_vpc_owner_id" {
type = string
default = ""
description = "The AWS account ID of the owner of the peer VPC"
}
variable "peer_region" {
type = string
default = ""
description = "The region of the peer VPC"
}
# ╺┳╸┏━╸┏┳┓┏━┓┏━┓┏━┓╻
# ┃ ┣╸ ┃┃┃┣━┛┃ ┃┣┳┛┃
# ╹ ┗━╸╹ ╹╹ ┗━┛╹┗╸┗━╸
variable "deploy_temporal" {
type = bool
default = true
description = "Whether to deploy Temporal infrastructure resources (S3 bucket + IAM role for postgres-pod)."
}
variable "temporal_s3_bucket" {
type = string
default = "temporal-pg-backups"
description = "Suffix for the Temporal PostgreSQL backup S3 bucket name. Final name: <deployment_name>-<temporal_s3_bucket>."
}
variable "temporal_s3_bucket_name_override" {
type = string
default = ""
description = "Override the full Temporal backup S3 bucket name (overrides the deployment_name prefix)."
}
variable "temporal_backup_lifecycle_expiration_days" {
type = number
default = 7
description = "Number of days after which Temporal PostgreSQL backup objects will expire and be deleted."
}
variable "s3_temporal_backup_tags" {
type = map(any)
default = {}
description = "Extra tags to apply to the Temporal backup S3 bucket."
}
variable "temporal_postgres_namespace" {
type = string
default = "temporal"
description = "Kubernetes namespace where the Temporal PostgreSQL CRD (and postgres-pod service account) is deployed."
}