-
Notifications
You must be signed in to change notification settings - Fork 10
/
eks.tf
56 lines (48 loc) · 1.31 KB
/
eks.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
#
##
### EKS
##
#
data "aws_eks_cluster" "eks-cluster" {
name = module.eks.cluster_id
}
data "aws_eks_cluster_auth" "eks-cluster" {
name = module.eks.cluster_id
}
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "14.0.0"
cluster_name = var.eks-cluster-name
cluster_version = "1.18"
subnets = module.vpc.private_subnets
vpc_id = module.vpc.vpc_id
node_groups = {
alpha = {
desired_capacity = 1
max_capacity = 3
min_capacity = 1
disk_size = var.wn-disk-size
instance_types = var.wn-instance-types[var.stage]
subnets = [module.vpc.private_subnets[0]]
}
beta = {
desired_capacity = 1
max_capacity = 3
min_capacity = 1
disk_size = var.wn-disk-size
instance_types = var.wn-instance-types[var.stage]
subnets = [module.vpc.private_subnets[1]]
}
gamma = {
desired_capacity = 1
max_capacity = 3
min_capacity = 1
disk_size = var.wn-disk-size
instance_types = var.wn-instance-types[var.stage]
subnets = [module.vpc.private_subnets[2]]
}
}
workers_additional_policies = ["arn:aws:iam::aws:policy/AmazonElasticFileSystemFullAccess"]
write_kubeconfig = true
config_output_path = "./"
}