Data Source: aws_eips#
Provides a list of Elastic IPs.
Example Usage#
The following shows all Elastic IPs with the specific tag value.
data "aws_eips" "example" {
tags = {
Env = "dev"
}
}
output "allocation_ids" {
value = data.aws_eips.example.allocation_ids
}
output "public_ips" {
value = data.aws_eips.example.public_ips
}
Argument Reference#
filter
- (Optional) Custom filter block as described below.tags
- (Optional) A map of tags, each pair of which must exactly match a pair on the desired Elastic IPs.
More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
name
- (Required) The name of the field to filter by it.values
- (Required) Set of values that are accepted for the given field.- An Elastic IP will be selected if any one of the given values matches.
For more information about filtering, see the EC2 API documentation.
Attributes Reference#
id
- The region.allocation_ids
- A list of all the allocation IDs.public_ips
- A list of all the Elastic IP addresses.