Data Source: aws_ami_ids#
Provides a list of image IDs.
Example Usage#
data "aws_ami_ids" "example" {
owners = ["self"]
}
Argument Reference#
owners
- (Required) List of image owners to limit search. At least one value must be specified.- Valid values: Project ID (
project@customer
) orself
- Valid values: Project ID (
executable_users
- (Optional) Limit search to project with explicit launch permission on the image.- Valid values: Project ID (
project@customer
),all
orself
- Valid values: Project ID (
filter
- (Optional) One or more name/value pairs to use as filters.- Valid values: See supported names and values in EC2 API documentation
name_regex
- (Optional) A regex string to apply to the image list returned by the EC2 API. It is recommended to combine this with other options to narrow down the list the EC2 API returns.sort_ascending
- (Optional) Used to sort images by creation time.- Default value:
false
- Default value:
Attribute Reference#
In addition to all arguments above, the following attribute is exported:
ids
- List of image IDs, sorted by creation time according tosort_ascending
.