Data Source: aws_ec2_managed_prefix_lists

This resource can be useful for getting back a list of managed prefix list ids to be referenced elsewhere.

Example Usage

The following returns all managed prefix lists filtered by tags

data "aws_ec2_managed_prefix_lists" "test_env" {
  tags = {
    Env = "test"
  }
}

data "aws_ec2_managed_prefix_list" "test_env" {
  count = length(data.aws_ec2_managed_prefix_lists.test_env.ids)
  id    = tolist(data.aws_ec2_managed_prefix_lists.test_env.ids)[count.index]
}

Argument Reference

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Timeouts

Configuration options: