forked from aws-ia/terraform-aws-eks-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheks-worker.tf
48 lines (34 loc) · 1.74 KB
/
eks-worker.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
# ---------------------------------------------------------------------------------------------------------------------
# MANAGED NODE GROUPS
# ---------------------------------------------------------------------------------------------------------------------
module "aws_eks_managed_node_groups" {
source = "./modules/aws-eks-managed-node-groups"
for_each = { for key, value in var.managed_node_groups : key => value
if length(var.managed_node_groups) > 0
}
managed_ng = each.value
context = local.node_group_context
depends_on = [kubernetes_config_map.aws_auth]
}
# ---------------------------------------------------------------------------------------------------------------------
# SELF MANAGED NODE GROUPS
# ---------------------------------------------------------------------------------------------------------------------
module "aws_eks_self_managed_node_groups" {
source = "./modules/aws-eks-self-managed-node-groups"
for_each = { for key, value in var.self_managed_node_groups : key => value
if length(var.self_managed_node_groups) > 0
}
self_managed_ng = each.value
context = local.node_group_context
depends_on = [kubernetes_config_map.aws_auth]
}
# ---------------------------------------------------------------------------------------------------------------------
# FARGATE PROFILES
# ---------------------------------------------------------------------------------------------------------------------
module "aws_eks_fargate_profiles" {
source = "./modules/aws-eks-fargate-profiles"
for_each = { for k, v in var.fargate_profiles : k => v if length(var.fargate_profiles) > 0 }
fargate_profile = each.value
context = local.fargate_context
depends_on = [kubernetes_config_map.aws_auth]
}