Terraform-provider-aws: aws_eip data source missing support to return multiple eips

Created on 28 Dec 2018  路  3Comments  路  Source: hashicorp/terraform-provider-aws

Description

We are trying to get multiple eips back to be able to whitelist them.
We are filtering them by tag and we expect to have multiple EIPs returned by the datasource but
we are getting this error:

data.aws_eip.revproxy[0]: data.aws_eip.revproxy.0: multiple Elastic IPs matched; use additional constraints to reduce matches to a single Elastic IP

new-data-source servicec2

Most helpful comment

Would be nice to have this! 馃帀

All 3 comments

The standard way of doing this is to create an aws_eips (note the plural) data source so that there is a data source that returns a list of the IDs of multiple things that match and then further information can be found by using the singular version of the data source (aws_eip in this case) to get more information such as the IP address from them.

This should probably be labelled with new-data-source and service/ec2.

@bflad I submitted a Pull request for this.

Would be nice to have this! 馃帀

Was this page helpful?
0 / 5 - 0 ratings