-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Problem Description
The aws_ami data source in the provided main.tf example fails to find a matching AMI when the name_regex is modified to search for arm64 images. This consistently results in a Your query returned no results error, preventing the cluster from being provisioned on Graviton instances. The same AMI is verifiable via manual search in the AWS Console.
Steps to Reproduce
- Use the
main.tffrom thesiderolabs/contribrepository. - Change the
data "aws_ami" "talos"block to search forarm64images. - Run
terraform plan.
Expected Behavior
The data "aws_ami" block should successfully find the latest arm64 AMI and proceed with the Terraform plan.
Actual Behavior
The terraform plan command fails with the following error:
╷
│ Error: Your query returned no results. Please change your search criteria and try again.
│
│ with data.aws_ami.talos,
│ on main.tf line 55, in data "aws_ami" "talos":
│ 55: data "aws_ami" "talos" {
│
╵
Environment
- AWS Region:
us-west-2 - Terraform Version:
1.8.x - AWS AMI Owner ID:
502334860662(Sidero Labs)
Suggested Solution
The issue appears to be with the specificity of the name_regex filter. A more robust regex, or a simpler filter, seems to resolve the issue.
Current data block that fails:
data "aws_ami" "talos" {
owners = ["502334860662"]
most_recent = true
name_regex = "^talos-v[0-9.]+-arm64$"
}Proposed Solution:
The data block should be updated to a more reliable search, or the name_regex should be made more flexible to account for naming variations.