-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
1825 lines (1667 loc) · 51.4 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
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
#
# Copyright 2023, Seqera Labs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
## Environment
variable "environment" {
type = string
default = ""
description = "The environment in which the infrastructure is being deployed."
}
## Region
variable "region" {
type = string
default = ""
description = "The AWS region in which the resources will be provisioned."
}
## Tags
variable "default_tags" {
type = map(string)
default = {
ManagedBy = "Terraform"
Product = "SeqeraPlatform"
}
description = "Default tags to be applied to the provisioned resources."
}
## VPC Name
variable "vpc_name" {
type = string
description = "The name of the Virtual Private Cloud (VPC) to be created."
}
## VPC CIDR
variable "vpc_cidr" {
type = string
description = "The CIDR block for the VPC."
default = "10.0.0.0/16"
validation {
condition = can(regex("^(10.0.0.0/16|172.31.0.0/16)$", var.vpc_cidr))
error_message = "Invalid VPC CIDR, only allowed are: '10.0.0.0/16', '172.31.0.0/16'. Default '10.0.0.0/16'"
}
}
## Number of Availability Zones
variable "num_azs" {
type = number
description = "The number of Availability Zones to use for the VPC."
default = 2
validation {
condition = var.num_azs <= 3 || var.num_azs >= 2
error_message = "The number of zones must be less than or equal to the number of available availability zones. Default '2'"
}
}
## AWS LoadBalancer Controller
variable "enable_aws_loadbalancer_controller" {
type = bool
default = true
description = "Determines whether the AWS LoadBalancer Controller should be deployed."
}
## Cluster Endpoint Public Access
variable "eks_cluster_endpoint_public_access" {
type = bool
default = true
description = "Determines whether the EKS cluster endpoint is publicly accessible."
}
## EKS Cluster Addons
variable "eks_cluster_addons" {
type = map(object({
most_recent = bool
}))
default = {
coredns = {
most_recent = true
}
kube-proxy = {
most_recent = true
}
vpc-cni = {
most_recent = true
}
}
description = "Addons to be enabled for the EKS cluster."
}
## EKS Managed Node Group - Minimum Size
variable "seqera_managed_node_group_min_size" {
type = number
default = 2
description = "The minimum size of the EKS managed node group."
}
## Create EKS cluster
variable "create_eks_cluster" {
type = bool
default = false
description = "Determines whether an EKS cluster should be created."
}
## Seqera Managed Node Group - Extra labels
variable "seqera_managed_node_group_labels" {
type = map(string)
default = {}
description = "Labels to be applied to the Seqera EKS managed node group."
}
## EKS aws-auth ConfigMap
variable "eks_manage_aws_auth_configmap" {
type = bool
default = true
description = "Determines whether to manage the aws-auth ConfigMap."
}
## EKS aws-auth ConfigMap - Roles
variable "eks_aws_auth_roles" {
type = list(string)
default = []
description = "List of roles ARNs to add to the aws-auth config map"
}
## EKS aws-auth ConfigMap - Users
variable "eks_aws_auth_users" {
type = list(string)
default = []
description = "List of users ARNs to add to the aws-auth config map"
}
## Enable AWS Cluster Autoscaler
variable "enable_aws_cluster_autoscaler" {
type = bool
default = false
description = "Determines whether the AWS Cluster Autoscaler should be deployed."
}
## AWS Cluster Autoscaler version
variable "aws_cluster_autoscaler_version" {
type = string
default = "9.29.3"
description = "The version of the AWS Cluster Autoscaler to deploy."
}
## AWS Cluster Autoscaler IAM Policy Name
variable "aws_cluster_autoscaler_iam_policy_name" {
type = string
default = "aws-cluster-autoscaler-iam-policy"
description = "The name of the IAM policy for the AWS Cluster Autoscaler."
}
## AWS Cluster Autoscaler IAM Policy
variable "aws_cluster_autoscaler_iam_policy" {
type = string
description = "IAM policy for the AWS Cluster Autoscaler"
default = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeAutoScalingInstances",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DescribeScalingActivities",
"autoscaling:DescribeTags",
"ec2:DescribeInstanceTypes",
"ec2:DescribeLaunchTemplateVersions"
],
"Resource": ["*"]
},
{
"Effect": "Allow",
"Action": [
"autoscaling:SetDesiredCapacity",
"autoscaling:TerminateInstanceInAutoScalingGroup",
"ec2:DescribeImages",
"ec2:GetInstanceTypesFromInstanceRequirements",
"eks:DescribeNodegroup"
],
"Resource": ["*"]
}
]
}
EOF
}
## Enable AWS EFS CSI Driver
variable "enable_aws_efs_csi_driver" {
type = bool
default = false
description = "Determines whether the AWS EFS CSI driver should be deployed."
}
## AWS EFS CSI Driver Security Group Name
variable "aws_efs_csi_driver_security_group_name" {
type = string
default = "aws-efs-csi-driver-sg"
description = "The name of the security group for the AWS EFS CSI driver."
}
## AWS EFS CSI Driver Security Group Ingress Rule Name
variable "aws_efs_csi_driver_security_group_ingress_rule_name" {
type = string
default = "nfs-tcp"
description = "The name of the security group ingress rule for the AWS EFS CSI driver."
}
## AWS EFS CSI Driver driver version
variable "aws_efs_csi_driver_version" {
type = string
default = "2.4.9"
description = "The version of the AWS EFS CSI driver to deploy."
}
## AWS EFS CSI Driver IAM Policy Name
variable "aws_efs_csi_driver_iam_policy_name" {
type = string
default = "aws-efs-csi-driver-iam-policy"
description = "The name of the IAM policy for the AWS EFS CSI driver."
}
## AWS EFS CSI Driver Creation Token Name
variable "aws_efs_csi_driver_creation_token_name" {
type = string
default = "seqera-efs-csi-driver"
description = "The creation token for the EFS file system."
}
## AWS EFS CSI Driver Performance Mode
variable "aws_efs_csi_driver_performance_mode" {
type = string
default = "generalPurpose"
description = "The performance mode of the EFS file system."
}
## AWS EFS CSI Driver backup policy status
variable "aws_efs_csi_driver_backup_policy_status" {
type = string
default = "ENABLED"
description = "The backup policy status of the EFS file system."
}
## AWS EFS CSI Driver storage class name
variable "aws_efs_csi_driver_storage_class_name" {
type = string
default = "efs-sc"
description = "The name of the storage class for the EFS file system."
}
## AWS EFS CSI Driver storage class reclaim policy
variable "aws_efs_csi_driver_storage_class_reclaim_policy" {
type = string
default = "Retain"
description = "The reclaim policy for the EFS file system."
}
## AWS EFS CSI Driver storage class parameters
variable "aws_efs_csi_driver_storage_class_parameters" {
type = map(string)
default = {
provisioningMode = "efs-ap"
directoryPerms = "700"
gidRangeStart = "1000"
gidRangeEnd = "2000"
basePath = "/dynamic_provisioning"
}
description = "The parameters for the storage class for the EFS file system."
}
## AWS EFS CSI Driver storage class storage provisioner name
variable "aws_efs_csi_driver_storage_class_storage_provisioner_name" {
type = string
default = "efs.csi.aws.com"
description = "The storage provisioner for the EFS file system."
}
## AWS EFS CSI Driver IAM Policy
variable "aws_efs_csi_driver_iam_policy" {
type = string
description = "IAM policy for the AWS EFS CSI driver"
default = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"elasticfilesystem:DescribeAccessPoints",
"elasticfilesystem:DescribeFileSystems",
"elasticfilesystem:DescribeMountTargets",
"ec2:DescribeAvailabilityZones"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"elasticfilesystem:CreateAccessPoint"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/efs.csi.aws.com/cluster": "true"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticfilesystem:TagResource"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:ResourceTag/efs.csi.aws.com/cluster": "true"
}
}
},
{
"Effect": "Allow",
"Action": "elasticfilesystem:DeleteAccessPoint",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/efs.csi.aws.com/cluster": "true"
}
}
}
]
}
EOF
}
## AWS LoadBalancer Controller IAM Policy Name
variable "aws_loadbalancer_controller_iam_policy_name" {
type = string
default = "aws-loadbalancer-controller-iam-policy"
description = "The name of the IAM policy for the AWS LoadBalancer Controller"
}
## AWS LoadBalancer Controller version
variable "aws_loadbalancer_controller_version" {
type = string
default = "1.6.0"
description = "The version of the AWS LoadBalancer Controller to deploy"
}
## AWS LoadBalancer Controller IAM Policy
variable "aws_loadbalancer_controller_iam_policy" {
type = string
default = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"iam:AWSServiceName": "elasticloadbalancing.amazonaws.com"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DescribeAccountAttributes",
"ec2:DescribeAddresses",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInternetGateways",
"ec2:DescribeVpcs",
"ec2:DescribeVpcPeeringConnections",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"ec2:DescribeInstances",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeTags",
"ec2:GetCoipPoolUsage",
"ec2:DescribeCoipPools",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeListenerCertificates",
"elasticloadbalancing:DescribeSSLPolicies",
"elasticloadbalancing:DescribeRules",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:DescribeTags"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"cognito-idp:DescribeUserPoolClient",
"acm:ListCertificates",
"acm:DescribeCertificate",
"iam:ListServerCertificates",
"iam:GetServerCertificate",
"waf-regional:GetWebACL",
"waf-regional:GetWebACLForResource",
"waf-regional:AssociateWebACL",
"waf-regional:DisassociateWebACL",
"wafv2:GetWebACL",
"wafv2:GetWebACLForResource",
"wafv2:AssociateWebACL",
"wafv2:DisassociateWebACL",
"shield:GetSubscriptionState",
"shield:DescribeProtection",
"shield:CreateProtection",
"shield:DeleteProtection"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupIngress"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateSecurityGroup"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateTags"
],
"Resource": "arn:aws:ec2:*:*:security-group/*",
"Condition": {
"StringEquals": {
"ec2:CreateAction": "CreateSecurityGroup"
},
"Null": {
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateTags",
"ec2:DeleteTags"
],
"Resource": "arn:aws:ec2:*:*:security-group/*",
"Condition": {
"Null": {
"aws:RequestTag/elbv2.k8s.aws/cluster": "true",
"aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupIngress",
"ec2:DeleteSecurityGroup"
],
"Resource": "*",
"Condition": {
"Null": {
"aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateTargetGroup"
],
"Resource": "*",
"Condition": {
"Null": {
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:CreateListener",
"elasticloadbalancing:DeleteListener",
"elasticloadbalancing:CreateRule",
"elasticloadbalancing:DeleteRule"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags",
"elasticloadbalancing:RemoveTags"
],
"Resource": [
"arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
],
"Condition": {
"Null": {
"aws:RequestTag/elbv2.k8s.aws/cluster": "true",
"aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags",
"elasticloadbalancing:RemoveTags"
],
"Resource": [
"arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*",
"arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*",
"arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*",
"arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*"
]
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:SetIpAddressType",
"elasticloadbalancing:SetSecurityGroups",
"elasticloadbalancing:SetSubnets",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:ModifyTargetGroup",
"elasticloadbalancing:ModifyTargetGroupAttributes",
"elasticloadbalancing:DeleteTargetGroup"
],
"Resource": "*",
"Condition": {
"Null": {
"aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags"
],
"Resource": [
"arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
],
"Condition": {
"StringEquals": {
"elasticloadbalancing:CreateAction": [
"CreateTargetGroup",
"CreateLoadBalancer"
]
},
"Null": {
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:DeregisterTargets"
],
"Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*"
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:SetWebAcl",
"elasticloadbalancing:ModifyListener",
"elasticloadbalancing:AddListenerCertificates",
"elasticloadbalancing:RemoveListenerCertificates",
"elasticloadbalancing:ModifyRule"
],
"Resource": "*"
}
]
}
EOF
description = "IAM policy for the AWS LoadBalancer Controller"
}
## Seqera Service Account IRSA IAM Policy
variable "seqera_platform_service_account_iam_policy" {
type = string
description = "IAM policy for the Seqera service account"
default = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TowerForge0",
"Effect": "Allow",
"Action": [
"ssm:GetParameters",
"ses:SendRawEmail",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetRole",
"iam:RemoveRoleFromInstanceProfile",
"iam:CreateRole",
"iam:DeleteRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:AddRoleToInstanceProfile",
"iam:PassRole",
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:DeleteRolePolicy",
"iam:ListRolePolicies",
"iam:TagRole",
"iam:TagInstanceProfile",
"batch:CreateComputeEnvironment",
"batch:DescribeComputeEnvironments",
"batch:CreateJobQueue",
"batch:DescribeJobQueues",
"batch:UpdateComputeEnvironment",
"batch:DeleteComputeEnvironment",
"batch:UpdateJobQueue",
"batch:DeleteJobQueue",
"batch:TagResource",
"fsx:DeleteFileSystem",
"fsx:DescribeFileSystems",
"fsx:CreateFileSystem",
"fsx:TagResource",
"ec2:DescribeSecurityGroups",
"ec2:DescribeAccountAttributes",
"ec2:DescribeSubnets",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeLaunchTemplateVersions",
"ec2:CreateLaunchTemplate",
"ec2:DeleteLaunchTemplate",
"ec2:DescribeKeyPairs",
"ec2:DescribeVpcs",
"ec2:DescribeInstanceTypeOfferings",
"ec2:GetEbsEncryptionByDefault",
"elasticfilesystem:DescribeMountTargets",
"elasticfilesystem:CreateMountTarget",
"elasticfilesystem:CreateFileSystem",
"elasticfilesystem:DescribeFileSystems",
"elasticfilesystem:DeleteMountTarget",
"elasticfilesystem:DeleteFileSystem",
"elasticfilesystem:UpdateFileSystem",
"elasticfilesystem:PutLifecycleConfiguration",
"elasticfilesystem:TagResource"
],
"Resource": "*"
},
{
"Sid": "TowerLaunch0",
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:List*",
"batch:DescribeJobQueues",
"batch:CancelJob",
"batch:SubmitJob",
"batch:ListJobs",
"batch:DescribeComputeEnvironments",
"batch:TerminateJob",
"batch:DescribeJobs",
"batch:RegisterJobDefinition",
"batch:DescribeJobDefinitions",
"ecs:DescribeTasks",
"ec2:DescribeInstances",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstanceAttribute",
"ecs:DescribeContainerInstances",
"ec2:DescribeInstanceStatus",
"ec2:DescribeImages",
"logs:Describe*",
"logs:Get*",
"logs:List*",
"logs:StartQuery",
"logs:StopQuery",
"logs:TestMetricFilter",
"logs:FilterLogEvents"
],
"Resource": "*"
}
]
}
EOF
}
## Seqera Namespace Name
variable "seqera_namespace_name" {
type = string
default = "seqera-platform"
description = "The name of the namespace used to deploy Seqera platform manifests."
}
## Enable Seqera Namespace
variable "create_seqera_namespace" {
type = bool
default = true
description = "Determines whether to create the Seqera namespace."
}
## Enable Seqera Service Account
variable "create_seqera_service_account" {
type = bool
default = true
description = "Determines whether to create the Seqera service account."
}
## Seqera Service Account Name
variable "seqera_service_account_name" {
type = string
description = "Name for the Seqera platform service account"
default = "seqera-sa"
}
## EKS Enable IRSA
variable "eks_enable_irsa" {
type = bool
default = true
description = "Determines whether to create an OpenID Connect Provider for EKS to enable IRSA"
}
## EKS Managed Node Group - Maximum Size
variable "seqera_managed_node_group_max_size" {
type = number
default = 4
description = "The maximum size of the EKS managed node group."
}
## EKS Managed Node Group - Desired Size
variable "seqera_managed_node_group_desired_size" {
type = number
default = 2
description = "The desired size of the EKS managed node group."
}
## Public Subnets
variable "public_subnets" {
type = list(string)
description = "A list of subnet IDs for public subnets within the VPC."
default = []
}
## Private Subnets
variable "private_subnets" {
type = list(string)
description = "A list of subnet IDs for private subnets within the VPC."
default = []
}
## Enable DNS Hostnames
variable "enable_dns_hostnames" {
type = bool
default = true
description = "Determines whether instances in the VPC receive DNS hostnames."
}
## Enable DNS Support
variable "enable_dns_support" {
type = bool
default = true
description = "Determines whether DNS resolution is supported for the VPC."
}
## Create database subnet group
variable "create_database_subnet_group" {
type = bool
default = true
description = "Determines whether a database subnet group should be created."
}
## Create database subnet route table
variable "create_database_subnet_route_table" {
type = bool
default = true
description = "Determines whether a subnet route table should be created for the database subnets."
}
## Enable One NAT Gateway Per AZ
variable "one_nat_gateway_per_az" {
type = bool
default = true
description = "Determines whether each Availability Zone should have a dedicated NAT gateway."
}
## Enable NAT Gateway
variable "enable_nat_gateway" {
type = bool
default = true
description = "Determines whether NAT gateways should be provisioned."
}
## Enable VPN Gateway
variable "enable_vpn_gateway" {
type = bool
default = false
description = "Determines whether a VPN gateway should be provisioned."
}
## EKS Cluster Name
variable "cluster_name" {
type = string
description = "The name of the EKS cluster."
default = "seqera"
}
## EKS Cluster Version
variable "cluster_version" {
type = string
default = "1.26"
description = "The version of Kubernetes to use for the EKS cluster."
}
## EKS Default Managed Node Group Instance Types
variable "eks_managed_node_group_defaults_instance_types" {
type = list(string)
default = ["m5a.2xlarge"]
description = "A list of EC2 instance types for the default managed node group."
}
## EKS Seqera managed Node Group Instance Types
variable "seqera_managed_node_group_defaults_instance_types" {
type = list(string)
default = ["m5a.2xlarge"]
description = "A list of EC2 instance types for the Seqera managed node group."
}
## EKS Default Managed Node Group capacity type
variable "eks_managed_node_group_defaults_capacity_type" {
type = string
default = "ON_DEMAND"
description = "The capacity type for the default managed node group."
}
## EKS Seqera managed Node Group capacity type
variable "seqera_managed_node_group_defaults_capacity_type" {
type = string
default = "ON_DEMAND"
description = "The capacity type for the Seqera managed node group."
}
## Enable AWS EBS CSI Driver
variable "enable_aws_ebs_csi_driver" {
type = bool
default = false
description = "Determines whether the EBS CSI driver should be deployed."
}
## AWS EBS CSI Driver version
variable "aws_ebs_csi_driver_version" {
type = string
default = "2.13.0"
description = "The version of the EBS CSI driver to deploy."
}
## AWS EBS CSI Driver IAM Policy Name
variable "aws_ebs_csi_driver_iam_policy_name" {
type = string
default = "ebs-csi-driver-iam-policy"
description = "The name of the IAM policy for the EBS CSI driver."
}
## AWS EBS CSI Driver IAM Policy
variable "aws_ebs_csi_driver_iam_policy" {
type = string
description = "IAM policy for the EBS CSI driver"
default = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:CreateSnapshot",
"ec2:AttachVolume",
"ec2:DetachVolume",
"ec2:ModifyVolume",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInstances",
"ec2:DescribeSnapshots",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:DescribeVolumesModifications"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateTags"
],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:snapshot/*"
],
"Condition": {
"StringEquals": {
"ec2:CreateAction": [
"CreateVolume",
"CreateSnapshot"
]
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DeleteTags"
],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:snapshot/*"
]
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/ebs.csi.aws.com/cluster": "true"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/CSIVolumeName": "*"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DeleteVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/ebs.csi.aws.com/cluster": "true"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DeleteVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/CSIVolumeName": "*"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DeleteVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/kubernetes.io/created-for/pvc/name": "*"