github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/d/ami_ids.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_ami_ids"
     4  sidebar_current: "docs-aws-datasource-ami-ids"
     5  description: |-
     6    Provides a list of AMI IDs.
     7  ---
     8  
     9  # aws\_ami_ids
    10  
    11  Use this data source to get a list of AMI IDs matching the specified criteria.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  data "aws_ami_ids" "ubuntu" {
    17    owners = ["099720109477"]
    18  
    19    filter {
    20      name   = "name"
    21      values = ["ubuntu/images/ubuntu-*-*-amd64-server-*"]
    22    }
    23  }
    24  ```
    25  
    26  ## Argument Reference
    27  
    28  * `executable_users` - (Optional) Limit search to users with *explicit* launch
    29  permission on  the image. Valid items are the numeric account ID or `self`.
    30  
    31  * `filter` - (Optional) One or more name/value pairs to filter off of. There
    32  are several valid keys, for a full reference, check out
    33  [describe-images in the AWS CLI reference][1].
    34  
    35  * `owners` - (Optional) Limit search to specific AMI owners. Valid items are
    36  the numeric account ID, `amazon`, or `self`.
    37  
    38  * `name_regex` - (Optional) A regex string to apply to the AMI list returned
    39  by AWS. This allows more advanced filtering not supported from the AWS API.
    40  This filtering is done locally on what AWS returns, and could have a performance
    41  impact if the result is large. It is recommended to combine this with other
    42  options to narrow down the list AWS returns.
    43  
    44  ~> **NOTE:** At least one of `executable_users`, `filter`, `owners` or
    45  `name_regex` must be specified.
    46  
    47  ## Attributes Reference
    48  
    49  `ids` is set to the list of AMI IDs, sorted by creation time in descending
    50  order.
    51  
    52  [1]: http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html