data "aws_ami" "eks-worker" { filter { name = "name" values = ["amazon-eks-node-${aws_eks_cluster.demo.version}-v*"] } most_recent = true owners = ["602401143452"] # Amazon } # EKS currently documents this required userdata for EKS worker nodes to # properly configure Kubernetes applications on the EC2 instance. # We utilize a Terraform local here to simplify Base64 encoding this # information into the AutoScaling Launch Configuration. # More information: https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html locals { demo-node-userdata = <