If region is set to us-west-1:
Error: Error refreshing state: 1 error(s) occurred:
module.eks.data.aws_ami.eks_worker: 1 error(s) occurred:
module.eks.data.aws_ami.eks_worker: data.aws_ami.eks_worker: Your query returned no results. Please change your search criteria and try again.
module "eks" {
source = "terraform-aws-modules/eks/aws"
cluster_name = "test-eks-cluster"
vpc_id = "${module.vpc.default_vpc_id}"
subnets = "${module.vpc.public_subnets}"
tags = {
Environment = "test"
Terraform = "true"
}
}
An available AWS AMI ID.
Not sure how.
@internaught EKS is only available in a few regions right now, and not yet in us-west-1. From experience I wouldn't hold your breath on us-west-1 availability, but I could of course be wrong on that.
From their blog post - https://aws.amazon.com/blogs/aws/amazon-eks-now-generally-available/
"Amazon EKS is available today in the US East (N. Virginia) and US West (Oregon) Regions and will be expanding to others very soon. We have a detailed roadmap and plan to crank out plenty of additional features this year."
Hi @internaught -
@bshelton229 's got the right idea. Only 2 regions are supported for EKS currently (AFAIK) and us-west-1 is not one of those.
We could set up a dummy resource (null_resource) to throw a custom exception if someone tries to use an unsupported an region (gathered by data source) but at least for now I'm opposed to this approach. Handling the likely race condition there would be tricky or impossible (AMI search done at same time) but to me even worse is trying to keep pace with predictable AWS change (adding regions for this service). Especially since the only benefit is gaining a custom error message rather than a more generic AMI related one, I don't see enough value to justify more code.
It seems that AWS are not following the ami naming convention set in the UK for the new EKS in ireland.
data "aws_ami" "eks-worker" {
filter {
name = "name"
values = ["eks-worker-*"]
}
WORKS
data "aws_ami" "eks-worker" {
filter {
name = "name"
values = ["amazon-eks-*"]
}
Hi @mooperd
The new EKS AMIs start with amazon-eks-node-* and that link you have there is for a different repo.
Thanks @mooperd and @max-rocket-internet!
The same goes for Frankfurt:
ami-010caa98bae9a09e2amazon-eks-node-1.11-v20190109
Most helpful comment
Hi @mooperd
The new EKS AMIs start with
amazon-eks-node-*and that link you have there is for a different repo.