Rejome
Rejome
CCoder.com
Created by Rejome on 10/8/2024 in #help
AWS: Can't make searching among custom (private) AMIs work
Hi team! I am building coder workspaces in my AWS account based on EC2 virtual machines. I have built a custom AMI (thanks to EC2 Image Builder). Now I want to use it in a Coder template. I have deployed a Coder instance by subscribing to the official item in AWS Marketplace. Then I created a teamplate based on AWS EC2 starter template. When I use the AMI ID directly, it works! However, when I want to use "aws_ami" to search among my AMIs, it does not find anything. What am I doing wrong?
data "aws_ami" "ubuntu" {
most_recent = true
filter {
name = "name"
values = ["*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
owners = ["self"]
}
data "aws_ami" "ubuntu" {
most_recent = true
filter {
name = "name"
values = ["*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
owners = ["self"]
}
I tried without any filter, I tried with the AWS account number directly for the owners field... no luck. Any help appreciated! Thanks!
11 replies