Files
opentf/website/source/docs/providers/aws/d/ebs_snapshot_ids.html.markdown
Joshua Spence d721ff6d66 provider/aws: Sort AMI and snapshot IDs (#13866)
As a follow up to #13844, this pull request sorts the AMIs and snapshots returned from the aws_ami_ids and aws_ebs_snapshot_ids data sources, respectively.
2017-04-25 15:11:21 -07:00

1.2 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_ebs_snapshot_ids docs-aws-datasource-ebs-snapshot-ids Provides a list of EBS snapshot IDs.

aws_ebs_snapshot_ids

Use this data source to get a list of EBS Snapshot IDs matching the specified criteria.

Example Usage

data "aws_ebs_snapshot_ids" "ebs_volumes" {
  owners = ["self"]

  filter {
    name   = "volume-size"
    values = ["40"]
  }

  filter {
    name   = "tag:Name"
    values = ["Example"]
  }
}

Argument Reference

The following arguments are supported:

  • owners - (Optional) Returns the snapshots owned by the specified owner id. Multiple owners can be specified.

  • restorable_by_user_ids - (Optional) One or more AWS accounts IDs that can create volumes from the snapshot.

  • filter - (Optional) One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-volumes in the AWS CLI reference.

Attributes Reference

ids is set to the list of EBS snapshot IDs, sorted by creation time in descending order.