Provides details about a specific EC2 Customer-Owned IP Pool.
This data source can prove useful when a module accepts a coip pool id as an input variable and needs to, for example, determine the CIDR block of that COIP Pool.
The following example returns a specific coip pool ID
variable "coip_pool_id" {}
data "aws_ec2_coip_pool" "selected" {
id = var.coip_pool_id
}
The arguments of this data source act as filters for querying the available COIP Pools in the current region. The given filters must match exactly one COIP Pool whose data will be exported as attributes.
local_gateway_route_table_id
- (Optional) Local Gateway Route Table Id assigned to desired COIP Pool
pool_id
- (Optional) ID of the specific COIP Pool to retrieve.
tags
- (Optional) Mapping of tags, each pair of which must exactly match
a pair on the desired COIP Pool.
More complex filters can be expressed using one or more filter
sub-blocks,
which take the following arguments:
name
- (Required) Name of the field to filter by, as defined by
the underlying AWS API.
values
- (Required) Set of values that are accepted for the given field.
A COIP Pool will be selected if any one of the given values matches.
All of the argument attributes except filter
blocks are also exported as
result attributes. This data source will complete the data by populating
any fields that are not included in the configuration with the data for
the selected COIP Pool.
This data source exports the following attributes in addition to the arguments above:
arn
- ARN of the COIP poolpool_cidrs
- Set of CIDR blocks in poolread
- (Default 20m
)