aws-samples / eks-workshop-v2

Hands-on labs for Amazon EKS
https://www.eksworkshop.com
Apache License 2.0
376 stars 387 forks source link

[Bug]: missing variable export in Terraform EKS deployment instruction #821

Open linuxus opened 5 months ago

linuxus commented 5 months ago

Installation method

Own AWS account

What happened?

When terraform apply command is ran the following error occurs: Plan: 35 to add, 0 to change, 0 to destroy. ╷ │ Error: "name" length must be between 1-100 characters: "" │ │ with module.eks.aws_eks_cluster.this[0], │ on .terraform/modules/eks/main.tf line 28, in resource "aws_eks_cluster" "this": │ 28: name = var.clustername │ ╵ ╷ │ Error: "name" doesn't comply with restrictions ("^[0-9A-Za-z][0-9A-Za-z-]+$"): "" │ │ with module.eks.aws_eks_cluster.this[0], │ on .terraform/modules/eks/main.tf line 28, in resource "aws_eks_cluster" "this": │ 28: name = var.cluster_name │ ╵

What did you expect to happen?

terraform apply should successfully complete after deployment of EKS cluster and the underpinning infrastructure such as VPC and NAT Gateway IGW etc...

How can we reproduce it?

Follow the Terraform instruction set

Anything else we need to know?

Missing the environment variable EKS_CLUSTER_NAME in the Cloud9 IDE shell. Running the following command prior terraform apply should fix it: export EKS_CLUSTER_NAME=eks-workshop

EKS version

1.27

gowthamshankar99 commented 2 months ago

I would love to contribute to this. can someone assign this issue to me ?