The following requirements are needed by this module:
The following providers are used by this module:
- aws (>=3.25.0)
No modules.
The following resources are used by this module:
- aws_eks_node_group.cluster_nodes (resource)
- aws_eks_cluster.cluster (data source)
The following input variables are required:
Description: the EKS cluster name
Type: string
Description: a map of objects containing the desired groups (each object name is the nodegroup name)
Type:
map(object(
{
node_role_arn = string,
subnet_ids = list(string),
version = string,
instance_types = list(string),
spot = bool
tags = map(string),
launch_template_id = string,
launch_template_version = string,
desired_size = string,
max_size = string,
min_size = string,
taint = map(string)
}
))
No optional inputs.
No outputs.
module "eks-nodegroups" {
source = "git::https://dummy.git"
cluster_name = var.cluster-name
nodegroups = {
group1 = {
node_role_arn = "arn:aws:iam::111111222222:role/eks_nodes",
subnet_ids = ["subnet1", "subnet2", "subnet3"],
version = "1.21",
instance_types = ["c5.xlarge"],
spot = false,
tags = {
owner = "[email protected]"
environment = "test"
},
launch_template_id = lt-0e06d290751193123,
launch_template_version = 2,
desired_size = 1,
max_size = 5,
min_size = 0,
taint = []
},
group2 = {
node_role_arn = "arn:aws:iam::111111222222:role/eks_nodes",
subnet_ids = ["subnet1", "subnet2", "subnet3"],
version = "1.21",
instance_types = ["c3.xlarge", "c4.xlarge", "c5.xlarge"],
spot = true,
tags = {
owner = "[email protected]"
environment = "test"
},
launch_template_id = "lt-0e06d290751193123",
launch_template_version = 2,
desired_size = 1,
max_size = 5,
min_size = 0,
taints = [{
key = "key1"
value = "value1"
effect = "NO_SCHEDULE" ## Valid values: NO_SCHEDULE, NO_EXECUTE, PREFER_NO_SCHEDULE
}]
}
}
}