-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
Description
Description
Disabling eks auto mode on an existing cluster fails. Apparently there are some related changes and issues that claimed to solve and reverted it again. As all related issues are closed i am have decided to raise a new issues.
- disabling auto modeΒ #3268
- fix: Correct Auto Mode disableΒ #3253
- fix: Ability to desactivate Auto ModΒ #3252
- Terraform apply fails after importing EKS cluster with Auto Mode disabledΒ #3236
Versions
-
Module version [Required]:
-
Terraform version:
Terraform v1.10.2 -
Provider version(s):
14:44:13.210 STDOUT terraform: Providers required by configuration:
14:44:13.210 STDOUT terraform: .
14:44:13.210 STDOUT terraform: βββ provider[registry.terraform.io/hashicorp/aws] >= 5.9.0
14:44:13.210 STDOUT terraform: βββ module.irsa_external-dns
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 4.0.0
14:44:13.210 STDOUT terraform: βββ module.karpenter
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.81.0
14:44:13.210 STDOUT terraform: βββ module.vpc
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.46.0
14:44:13.210 STDOUT terraform: βββ module.eks
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.81.0
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/tls] >= 3.0.0
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/time] >= 0.9.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.eks_managed_node_group
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.81.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.user_data
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/cloudinit] >= 2.0.0
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/null] >= 3.0.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.fargate_profile
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.81.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.kms
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 4.33.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.self_managed_node_group
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 5.81.0
14:44:13.210 STDOUT terraform: βΒ Β βββ module.user_data
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/cloudinit] >= 2.0.0
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/null] >= 3.0.0
14:44:13.210 STDOUT terraform: βββ module.irsa_argocd
14:44:13.210 STDOUT terraform: βΒ Β βββ provider[registry.terraform.io/hashicorp/aws] >= 4.0.0
14:44:13.210 STDOUT terraform: βββ module.irsa_aws-load-balancer-controller
14:44:13.210 STDOUT terraform: βββ provider[registry.terraform.io/hashicorp/aws] >= 4.0.0
14:44:13.210 STDOUT terraform: Providers required by state:
14:44:13.210 STDOUT terraform: provider[registry.terraform.io/hashicorp/aws]
14:44:13.210 STDOUT terraform: provider[registry.terraform.io/hashicorp/time]
14:44:13.210 STDOUT terraform: provider[registry.terraform.io/hashicorp/tls]
Reproduction Code [Required]
working with auto mode
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 20.31"
cluster_name = local.name
cluster_version = "1.31"
# auto mode
cluster_compute_config = {
enabled = true
# see custom node pools in manifests/modules/cluster-aws-eks/
node_pools = ["system"]
}
cluster_endpoint_public_access = true
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
cluster_ip_family = "ipv6"
create_cni_ipv6_iam_policy = true
iam_role_additional_policies = {
"policy-eks-cluster" = aws_iam_policy.iam_cluster_policy.arn
}
}
changing to:
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 20.31"
cluster_name = local.name
cluster_version = "1.31"
# auto mode
#cluster_compute_config = {
# # disable auto mode
# enabled = false
# # see custom node pools in manifests/modules/cluster-aws-eks/
## node_pools = ["system"]
#}
cluster_endpoint_public_access = true
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
cluster_ip_family = "ipv6"
create_cni_ipv6_iam_policy = true
iam_role_additional_policies = {
"policy-eks-cluster" = aws_iam_policy.iam_cluster_policy.arn
}
eks_managed_node_group_defaults = {
iam_role_additional_policies = {
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
eks_managed_node_groups = {
system = {
# https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html
ami_type = "BOTTLEROCKET_ARM_64"
instance_types = ["t4g.large"]
capacity_type = "ON_DEMAND"
min_size = 1
max_size = 2
desired_size = 1
labels = {
# Used to ensure Karpenter runs on nodes that it does not manage
"karpenter.sh/controller" = "true"
"CriticalAddonsOnly" = "true"
}
taints = {
# The pods that do not tolerate this taint should run on nodes
CriticalAddonsOnly = {
key = "CriticalAddonsOnly"
value = "true"
effect = "NO_SCHEDULE"
}
}
}
}
}
Steps to reproduce the behavior:
Expected behavior
no error
Actual behavior
Error: compute_config.enabled, kubernetes_networking_config.elastic_load_balancing.enabled, and storage_config.block_storage.enabled must all be set to either true or false
Terminal Output Screenshot(s)
β Error: compute_config.enabled, kubernetes_networking_config.elastic_load_balancing.enabled, and storage_config.block_storage.enabled must all be set to either true or false
β
β with module.eks.aws_eks_cluster.this[0],
β on .terraform/modules/eks/main.tf line 35, in resource "aws_eks_cluster" "this":
β 35: resource "aws_eks_cluster" "this" {
Additional context
brianpham, gopkri24, adamwshero, wawaberry, swirle13 and 4 morembmblbelt, adamwshero and swirle13