Skip to content

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) or self
  • executable_users - (Optional) Limit search to project with explicit launch permission on the image.
    • Valid values: Project ID (project@customer), all or self
  • filter - (Optional) One or more name/value pairs to use as filters.
  • 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

Attribute Reference#

In addition to all arguments above, the following attribute is exported:

  • ids - List of image IDs, sorted by creation time according to sort_ascending.