Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module returns "query returned no results" when using a non existent cluster_version #1141

Closed
1 of 4 tasks
mahpatil opened this issue Dec 10, 2020 · 6 comments · Fixed by #1371
Closed
1 of 4 tasks

Comments

@mahpatil
Copy link

mahpatil commented Dec 10, 2020

I have issues

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

Get "Error: Your query returned no results. Please change your search criteria and try again." if the cluster_version specified is incorrect.

If this is a bug, how to reproduce? Please include a code sample if relevant.

module "eks-cluster" {
  source          = "terraform-aws-modules/eks/aws"
  cluster_name    = var.cluster_name
  cluster_version = var.cluster_version //set this to "1.19" currently AWS latest v 1.18
  subnets         = var.subnets
  vpc_id          = var.vpc_id

  worker_groups = [
    {
      instance_type         = var.instance_type
      asg_max_size          = var.asg_max_size
      asg_desired_capacity  = var.asg_desired_capacity
      additional_userdata   = var.additional_userdata
    }
  ]
  tags = var.tags
}

What's the expected behavior?

I would expect it to fail with a bit more friendly message but I get below error, it is confusing and doesn't lead to specific field.
Error: Your query returned no results. Please change your search criteria and try again.

Error: Your query returned no results. Please change your search criteria and try again.

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version: 13.2.1+
  • OS: macOS
  • Terraform version: 0.14

Any other relevant info

@btsuhako
Copy link

this module is searching for amazon-eks-node-1.19-v* in the AMI registry -> https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v13.2.1/local.tf#L18

right now it looks like AWS hasn't published that AMI yet. 1.18 available, but 1.19 isn't:
image
image

@dbirks
Copy link

dbirks commented Feb 17, 2021

In case anyone else tries updating to 1.19 now that it's available:

Screenshot from 2021-02-16 21-22-38

I ran into the same query returned no results error, until I manually set the Windows ami to 1.18 (even though I'm not using any Windows nodes):

worker_ami_name_filter_windows = "Windows_Server-2019-English-Core-EKS_Optimized-1.18-*"

It looks like AWS just hasn't released a Windows 1.19 ami yet.

@sanarena
Copy link

Ah, Terraform should have a better error handling for this.
After doing a change in a large TF code base, i got hit by this error and Terraform was not announcing where is the issue coming from.

@dbirks solution solved my issue.

@obeleh
Copy link

obeleh commented Feb 18, 2021

How would I go about if I use node_groups in stead of workers?

@barryib
Copy link
Member

barryib commented May 19, 2021

I just opened #1371 to address this. Will you please review it and test it ?

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants