Skip to content

Commit

Permalink
Fix EKS release version handle null default correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
pst committed Jan 4, 2024
1 parent b2b9db2 commit 38d20df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/_modules/eks/node_pool/launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

Expand Down

0 comments on commit 38d20df

Please sign in to comment.