Skip to content

Commit 63b12bc

Browse files
committed
[BOYSCOUT]: Version iam structs because of incompatibilities
1 parent 2179d54 commit 63b12bc

File tree

3 files changed

+108
-92
lines changed

3 files changed

+108
-92
lines changed

modules/eks/main.tf

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
data "aws_caller_identity" "current" {}
22

33
module "ebs_csi_irsa_role" {
4-
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
4+
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
5+
version = "6.2.1"
56

6-
name = "${var.deployment_name}-ebs-csi-controller"
7+
name = "${var.deployment_name}-ebs-csi-controller"
78
attach_ebs_csi_policy = true
89

910
oidc_providers = {
@@ -15,9 +16,10 @@ module "ebs_csi_irsa_role" {
1516
}
1617

1718
module "k8s_load_balancer_controller_role" {
18-
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
19+
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
20+
version = "6.2.1"
1921

20-
name = "${var.deployment_name}-lb-controller"
22+
name = "${var.deployment_name}-lb-controller"
2123
attach_load_balancer_controller_policy = true
2224

2325
oidc_providers = {
@@ -29,9 +31,10 @@ module "k8s_load_balancer_controller_role" {
2931
}
3032

3133
module "cluster_autoscaler_role" {
32-
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
34+
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts"
35+
version = "6.2.1"
3336

34-
name = "${var.deployment_name}-cluster-autoscaler"
37+
name = "${var.deployment_name}-cluster-autoscaler"
3538
attach_cluster_autoscaler_policy = true
3639
cluster_autoscaler_cluster_names = [module.eks.cluster_name]
3740

@@ -53,7 +56,7 @@ module "eks" {
5356
name = var.deployment_name
5457
kubernetes_version = var.k8s_cluster_version
5558

56-
endpoint_public_access = true
59+
endpoint_public_access = true
5760
endpoint_public_access_cidrs = var.k8s_public_access_cidrs
5861

5962
enable_irsa = true
@@ -79,10 +82,10 @@ module "eks" {
7982
service_account_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${var.deployment_name}-ebs-csi-controller"
8083
most_recent = true
8184
before_compute = true
82-
configuration_values = jsonencode({
83-
"sidecars": {
84-
"snapshotter": {
85-
"forceEnable": false
85+
configuration_values = jsonencode({
86+
"sidecars" : {
87+
"snapshotter" : {
88+
"forceEnable" : false
8689
}
8790
}
8891
})
@@ -96,24 +99,24 @@ module "eks" {
9699

97100
# Self Managed Node Group(s)
98101
self_managed_node_groups = var.self_managed_node_grps
99-
eks_managed_node_groups = var.managed_node_grps
100-
101-
# access_entries = {
102-
# allow_support_access = {
103-
# kubernetes_groups = []
104-
# principal_arn = resource.aws_iam_role.eks_support_role.arn (# from cloud-infra)
105-
#
106-
# policy_associations = {
107-
# single = {
108-
# policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
109-
# access_scope = {
110-
# namespaces = []
111-
# type = "cluster"
112-
# }
113-
# }
114-
# }
115-
# }
116-
# }
102+
eks_managed_node_groups = var.managed_node_grps
103+
104+
# access_entries = {
105+
# allow_support_access = {
106+
# kubernetes_groups = []
107+
# principal_arn = resource.aws_iam_role.eks_support_role.arn (# from cloud-infra)
108+
#
109+
# policy_associations = {
110+
# single = {
111+
# policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
112+
# access_scope = {
113+
# namespaces = []
114+
# type = "cluster"
115+
# }
116+
# }
117+
# }
118+
# }
119+
# }
117120

118121
tags = var.tags
119122
}

modules/eks/outputs.tf

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,126 +20,126 @@ output "cluster_endpoint" {
2020

2121
# dfshell
2222
output "dfshell_role_arn" {
23-
value = module.dfshell_role[0].arn
23+
value = module.dfshell_role[0].arn
2424
description = "The ARN of the AWS Bedrock role"
2525
}
2626
output "dfshell_service_account_name" {
27-
value = var.dfshell_service_account_name
27+
value = var.dfshell_service_account_name
2828
description = "The name of the service account for dfshell"
2929
}
3030

3131
# worker_portal
3232
output "worker_portal_role_arn" {
33-
value = module.worker_portal_role[0].arn
33+
value = module.worker_portal_role[0].arn
3434
description = "The ARN of the AWS Bedrock role"
3535
}
3636
output "worker_portal_service_account_name" {
37-
value = var.worker_portal_service_account_name
37+
value = var.worker_portal_service_account_name
3838
description = "The name of the service account for worker_portal"
3939
}
4040

4141
# operator
4242
output "operator_role_arn" {
43-
value = module.operator_role[0].arn
43+
value = module.operator_role[0].arn
4444
description = "The ARN of the AWS Bedrock role"
4545
}
4646
output "operator_service_account_name" {
47-
value = var.operator_service_account_name
47+
value = var.operator_service_account_name
4848
description = "The name of the service account for operator"
4949
}
5050

5151
# server
5252
output "server_role_arn" {
53-
value = module.server_role[0].arn
53+
value = module.server_role[0].arn
5454
description = "The ARN of the AWS Bedrock role"
5555
}
5656
output "server_service_account_name" {
57-
value = var.server_service_account_name
57+
value = var.server_service_account_name
5858
description = "The name of the service account for server"
5959
}
6060

6161
# scheduler
6262
output "scheduler_role_arn" {
63-
value = module.scheduler_role[0].arn
63+
value = module.scheduler_role[0].arn
6464
description = "The ARN of the AWS Bedrock role"
6565
}
6666
output "scheduler_service_account_name" {
67-
value = var.scheduler_service_account_name
67+
value = var.scheduler_service_account_name
6868
description = "The name of the service account for scheduler"
6969
}
7070

7171
# worker, worker1, worker2 etc.
7272
output "worker_role_arn" {
73-
value = module.worker_role[0].arn
73+
value = module.worker_role[0].arn
7474
description = "The ARN of the AWS Bedrock role"
7575
}
7676
output "worker_service_account_name" {
77-
value = var.worker_service_account_name
77+
value = var.worker_service_account_name
7878
description = "The name of the service account for worker"
7979
}
8080

8181
# worker_catalog
8282
output "worker_catalog_role_arn" {
83-
value = module.worker_catalog_role[0].arn
83+
value = module.worker_catalog_role[0].arn
8484
description = "The ARN of the AWS Bedrock role"
8585
}
8686
output "worker_catalog_service_account_name" {
87-
value = var.worker_catalog_service_account_name
87+
value = var.worker_catalog_service_account_name
8888
description = "The name of the service account for worker_catalog"
8989
}
9090

9191
# worker_interactive
9292
output "worker_interactive_role_arn" {
93-
value = module.worker_interactive_role[0].arn
93+
value = module.worker_interactive_role[0].arn
9494
description = "The ARN of the AWS Bedrock role"
9595
}
9696
output "worker_interactive_service_account_name" {
97-
value = var.worker_interactive_service_account_name
97+
value = var.worker_interactive_service_account_name
9898
description = "The name of the service account for worker_interactive"
9999
}
100100

101101
# worker_singletons
102102
output "worker_singletons_role_arn" {
103-
value = module.worker_singletons_role[0].arn
103+
value = module.worker_singletons_role[0].arn
104104
description = "The ARN of the AWS Bedrock role"
105105
}
106106
output "worker_singletons_service_account_name" {
107-
value = var.worker_singletons_service_account_name
107+
value = var.worker_singletons_service_account_name
108108
description = "The name of the service account for worker_singletons"
109109
}
110110

111111
# worker_lineage
112112
output "worker_lineage_role_arn" {
113-
value = module.worker_lineage_role[0].arn
113+
value = module.worker_lineage_role[0].arn
114114
description = "The ARN of the AWS Bedrock role"
115115
}
116116
output "worker_lineage_service_account_name" {
117-
value = var.worker_lineage_service_account_name
117+
value = var.worker_lineage_service_account_name
118118
description = "The name of the service account for worker_lineage"
119119
}
120120

121121
# worker_monitor
122122
output "worker_monitor_role_arn" {
123-
value = module.worker_monitor_role[0].arn
123+
value = module.worker_monitor_role[0].arn
124124
description = "The ARN of the AWS Bedrock role"
125125
}
126126
output "worker_monitor_service_account_name" {
127-
value = var.worker_monitor_service_account_name
127+
value = var.worker_monitor_service_account_name
128128
description = "The name of the service account for worker_monitor"
129129
}
130130

131131
# storage_worker
132132
output "storage_worker_role_arn" {
133-
value = module.storage_worker_role[0].arn
133+
value = module.storage_worker_role[0].arn
134134
description = "The ARN of the AWS Bedrock role"
135135
}
136136
output "storage_worker_service_account_name" {
137-
value = var.storage_worker_service_account_name
137+
value = var.storage_worker_service_account_name
138138
description = "The name of the service account for storage_worker"
139139
}
140140

141141
# Clickhouse backup
142142
output "clickhouse_backup_role_name" {
143-
value = module.clickhouse_backup_role.arn
143+
value = module.clickhouse_backup_role.arn
144144
description = "The name of the role for clickhouse backups"
145145
}

0 commit comments

Comments
 (0)