mirror of
https://github.com/terraform-aws-modules/terraform-aws-eks.git
synced 2025-09-09 19:32:58 +08:00
127a3a8831
NOTES: Managed Node Groups now support Launch Templates. The Launch Template it self is not managed by this module, so you have to create it by your self and pass it's id to this module. See docs and [`examples/launch_templates_with_managed_node_groups/`](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/launch_templates_with_managed_node_group) for more details.
25 lines
722 B
Terraform
25 lines
722 B
Terraform
resource "random_pet" "node_groups" {
|
|
for_each = local.node_groups_expanded
|
|
|
|
separator = "-"
|
|
length = 2
|
|
|
|
keepers = {
|
|
ami_type = lookup(each.value, "ami_type", null)
|
|
disk_size = lookup(each.value, "disk_size", null)
|
|
instance_type = each.value["instance_type"]
|
|
iam_role_arn = each.value["iam_role_arn"]
|
|
|
|
key_name = each.value["key_name"]
|
|
|
|
source_security_group_ids = join("|", compact(
|
|
lookup(each.value, "source_security_group_ids", [])
|
|
))
|
|
subnet_ids = join("|", each.value["subnets"])
|
|
node_group_name = join("-", [var.cluster_name, each.key])
|
|
launch_template = lookup(each.value, "launch_template_id", null)
|
|
}
|
|
|
|
depends_on = [var.ng_depends_on]
|
|
}
|