Closed
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
aws_ami
data source requires owners
argument. Buf if image-id
is known, it should be query without owners
.
Motivation
aws_imagebuilder_image
data source can query latest ami. It returns image
and account_id
. But sometimes account_id
is empty. Or AMI public parameters can get image-id
only.
Then aws_imagebuilder_image_recipe
resource can set ebs parameters. When specify root volume, device_name
is required. But root's device_name
is not fixed, and it depends on ami. It can query only aws_ami
data source.
New or Affected Resource(s)
- aws_ami (data source)
- aws_ami_by_id (data source)
Potential Terraform Configuration
data "aws_ami" "parent" {
owners = null
filter {
name = "image-id"
values = ["ami-XXX"]
}
}
# or simply,
data "aws_ami_by_id" "parent" {
image_id = "ami-XXX"
}