terraform-aws-eks icon indicating copy to clipboard operation
terraform-aws-eks copied to clipboard

Failed to create Node Group with Launch Template

Open KamilWalczak-TomTom opened this issue 3 years ago β€’ 0 comments

Description

When using default configuration with default Launch Template creating Node Groupd end with failure, timeout. There is no additional error, only timeout, Terraform running in DEBUG mode does not tell us anything more. The issue was observed with new cluster creation.

Versions

  • Module version:

$ terraform.exe -version
Terraform v1.2.6 on windows_amd64

  • provider registry.terraform.io/carlpett/sops v0.7.1
  • provider registry.terraform.io/gavinbunney/kubectl v1.14.0
  • provider registry.terraform.io/hashicorp/aws v3.75.2
  • provider registry.terraform.io/hashicorp/azurerm v3.16.0
  • provider registry.terraform.io/hashicorp/cloudinit v2.2.0
  • provider registry.terraform.io/hashicorp/helm v2.6.0
  • provider registry.terraform.io/hashicorp/kubernetes v2.12.1
  • provider registry.terraform.io/hashicorp/template v2.2.0
  • provider registry.terraform.io/hashicorp/tls v3.4.0
  • provider registry.terraform.io/integrations/github v4.28.0

Reproduction Code

module "eks_cluster" {
  source  = "terraform-aws-modules/eks/aws"
  version = "18.26.6"

  cluster_name                       = local.cluster_name
  cluster_version                    = "1.21"
  vpc_id                             = local.vpc_id
  subnet_ids                         = local.subnet_ids
  prefix_separator                   = ""
  iam_role_name                      = local.cluster_name
  cluster_security_group_name        = local.cluster_name
  cluster_security_group_description = "EKS cluster security group."
  cluster_endpoint_private_access    = true
  cluster_endpoint_public_access     = true
  enable_irsa                        = true
  manage_aws_auth_configmap          = true
  tags                               = local.tags

  eks_managed_node_group_defaults = {
    ami_type               = "AL2_x86_64"
    disk_size              = 50
  }
  eks_managed_node_groups = {
    primary = {
      desired_size   = 1
      min_size       = 1
      max_size       = 4
      instance_types = ["t3.xlarge"]
    }
  }

  aws_auth_roles = [
    {
      rolearn  = "arn:aws:iam::${local.aws_account_id}:role/AccountAdministrator"
      username = "account-administrator"
      groups   = ["system:masters"]
    }
  ]
}    

Steps to reproduce the behavior:

Are you using workspaces? NO Have you cleared the local cache? YES

List steps: terraform init terraform apply

Expected behavior

Cluster with one Node Group will be created.

Actual behavior

Cluster was created. Node Group creation failed.

Terminal Output Screenshot(s)

Will add soon.

Additional context

To solve problem we have to change eks_managed_node_group_defaults definition:

  eks_managed_node_group_defaults = {
    ami_type               = "AL2_x86_64"
    disk_size              = 50
    create_launch_template = false
    launch_template_name   = ""
  }

KamilWalczak-TomTom avatar Aug 05 '22 10:08 KamilWalczak-TomTom