diff --git a/aws/_modules/eks/node_pool/launch_template.tf b/aws/_modules/eks/node_pool/launch_template.tf index 77bd5c01..a7ac8e86 100644 --- a/aws/_modules/eks/node_pool/launch_template.tf +++ b/aws/_modules/eks/node_pool/launch_template.tf @@ -9,7 +9,7 @@ locals { is_gpu = length(data.aws_ec2_instance_type.current.gpus) > 0 ami_name = local.is_gpu ? "amazon-linux-2-gpu" : local.cpu_ami_name ami_release_prefix = local.is_gpu ? "amazon-eks-gpu-node" : "amazon-eks-node" - ami_release_date = split("-", var.ami_release_version)[1] + ami_release_date = var.ami_release_version == null ? "" : split("-", var.ami_release_version)[1] ami_release_name = var.ami_release_version == null ? "recommended" : "${local.ami_release_prefix}-${var.kubernetes_version}-v${local.ami_release_date}" }