-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self managed node group fails with default cluster_version = null
#1959
Comments
I think its better if we just rely on users specifying the version - it aligns with the other sub-modules as well |
The behavior of the self managed node group is inconsistent with the other sub-modules. for example module "eks" {
source = "terraform-aws-modules/eks/aws"
version = ">= 18.0.0"
cluster_name = local.name
# cluster_version = "1.21"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
self_managed_node_groups = {
boo = {
instance_type = "t3.medium"
instance_market_options = {
market_type = "spot"
}
}
}
} FAIL: The plan fails as the self managed node group fails to look up the EKS AMI with latest cluster version.
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = ">= 18.0.0"
cluster_name = local.name
# cluster_version = "1.21"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
eks_managed_node_groups = {
foo = {}
}
} PASS: creates eks managed node group on latest cluster version module "eks" {
source = "terraform-aws-modules/eks/aws"
version = ">= 18.0.0"
cluster_name = local.name
# cluster_version = "1.21"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
fargate_profiles = {
bar = {
selectors = [
{
namespace = "bar"
}
]
}
}
} PASS: creates fargate profile on latest cluster version |
Self managed node groups by their very nature are different from EKS managed or Fargate profiles because all management is up to users |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
The self managed node group uses the cluster_version input used to lookup default AMI ID if one is not provided. But the default for
cluster_version
isnull
.The
data.aws_ami.eks_default
data resource will fail to filter with the null value. e.g.amazon-eks-node-null-v*
Versions
terraform-aws-modules/eks/aws
(0.18.3)self-managed-node-group
Reproduction
Steps to reproduce the behavior:
terraform-aws-modules/eks/aws
withself_managed_node_groups
sub-module and don't setcluster_version
Code Snippet to Reproduce
Expected behavior
defaults to the cluster version.
Actual behavior
defaults to null
Terminal Output Screenshot(s)
Additional context
one possible solution is to retrieve the
cluster_version
from a data resource and set that as the defaultThe text was updated successfully, but these errors were encountered: