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

Timeout waiting on cluster to become active

Open sfloyd-tn opened this issue 3 years ago β€’ 1 comments

Description

I am using an almost exact copy of the managed_nodes example found here: https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/eks_managed_node_group

When I run apply it takes roughly an hour and then will time out with the following error:

module.eks.aws_eks_cluster.this[0]: Still creating... [57m26s elapsed]
β•·
β”‚ Error: error waiting for EKS Cluster (xxxxxx-eks) to create: timeout while waiting for state to become 'ACTIVE' (last state: 'CREATING', timeout: 30m0s)
β”‚
β”‚   with module.eks.aws_eks_cluster.this[0],
β”‚   on .terraform/modules/eks/main.tf line 14, in resource "aws_eks_cluster" "this":
β”‚   14: resource "aws_eks_cluster" "this" {

When I check in the AWS console I can see the cluster and also see that it is already active. If I then try and run apply again I get the following error:

aws_security_group.remote_access: Modifications complete after 2s [id=sg-0xxxxx3]
β•·
β”‚ Error: error creating EKS Cluster (xxxxxx-eks): ResourceInUseException: Cluster already exists with name: xxxxxx-eks
β”‚ {
β”‚   RespMetadata: {
β”‚     StatusCode: 409,
β”‚     RequestID: "27740053-7d00-40e6-8f0c-8f26482cec70"
β”‚   },
β”‚   ClusterName: "xxxxxx-eks",
β”‚   Message_: "Cluster already exists with name: xxxxxx-eks"
β”‚ }
β”‚
β”‚   with module.eks.aws_eks_cluster.this[0],
β”‚   on .terraform/modules/eks/main.tf line 14, in resource "aws_eks_cluster" "this":
β”‚   14: resource "aws_eks_cluster" "this" {
  • [ x ] βœ‹ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: registry.terraform.io/terraform-aws-modules/eks/aws 18.29.0 for eks

  • Terraform version:

$ terraform -version
Terraform v1.1.4
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.0.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.13.1
+ provider registry.terraform.io/hashicorp/tls v4.0.2

Reproduction Code [Required]

The code I used is here...exactly but with my own vars subbed in where needed: https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/eks_managed_node_group

Expected behavior

Should be able to run the code from end to end without failing.

Actual behavior

Apply times out waiting for eks cluster to become active while it already is active as seen in the AWS console.

sfloyd-tn avatar Sep 16 '22 14:09 sfloyd-tn

The code I used is here...exactly but with my own vars subbed in where needed: master/examples/eks_managed_node_group

this doesn't show a reproduction - there are other factors that largely influence EKS cluster issues, such as networking settings and account permissions/SCPs

All I can say currently is that the examples provision successfully as they are currently written

bryantbiggs avatar Sep 16 '22 14:09 bryantbiggs

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Oct 17 '22 00:10 github-actions[bot]

This issue was automatically closed because of stale in 10 days

github-actions[bot] avatar Oct 28 '22 00:10 github-actions[bot]

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.

github-actions[bot] avatar Nov 27 '22 02:11 github-actions[bot]