I am stumped as to why the following query fails.
data "aws_ami" "linux_rocky9_arm64" {
most_recent = true
owners = ["self", "63XXXXXXXX"]
executable_users = ["self"]
filter {
name = "name"
values = ["linux-base-rocky9-arm64"]
}
}
I am running the plan with an Organizational Unit credentials. I am able to see this shared AMI using AWS CLI aws ec2 describe-images
.
terraform plan fails with the following:
╷
│ Error: Your query returned no results. Please change your search criteria and try again.
│
│ with data.aws_ami.linux_rocky9_arm64,
│ on main.tf line 23, in data "aws_ami" "linux_rocky9_arm64":
│ 23: data "aws_ami" "linux_rocky9_arm64" {
│
╵