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.tf from the siderolabs/contrib repository.
- Change the
data "aws_ami" "talos" block to search for arm64 images.
- 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.
Problem Description
The
aws_amidata source in the providedmain.tfexample fails to find a matching AMI when thename_regexis modified to search forarm64images. This consistently results in aYour query returned no resultserror, preventing the cluster from being provisioned on Graviton instances. The same AMI is verifiable via manual search in the AWS Console.Steps to Reproduce
main.tffrom thesiderolabs/contribrepository.data "aws_ami" "talos"block to search forarm64images.terraform plan.Expected Behavior
The
data "aws_ami"block should successfully find the latestarm64AMI and proceed with the Terraform plan.Actual Behavior
The
terraform plancommand fails with the following error:Environment
us-west-21.8.x502334860662(Sidero Labs)Suggested Solution
The issue appears to be with the specificity of the
name_regexfilter. A more robust regex, or a simpler filter, seems to resolve the issue.Current
datablock that fails:Proposed Solution:
The
datablock should be updated to a more reliable search, or thename_regexshould be made more flexible to account for naming variations.