Skip to content

Tutorial example fails: Error: Your query returned no results #6

@n11sar

Description

@n11sar

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

│ with data.aws_ami.ubuntu,
│ on main.tf line 12, in data "aws_ami" "ubuntu":
│ 12: data "aws_ami" "ubuntu" {

Related to outdated version of Ubuntu in line:

filter {
  name   = "name"
  values = ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"]
}

inside main.tf

Suggested fix - update to latest Ubuntu LTS. Also need to be careful not only name changed but also disk type:

filter {
  name   = "name"
  values = ["ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions