Data Source: awsEips
Provides a list of Elastic IPs in a region.
Example Usage
The following shows outputting all Elastic IPs with the a specific tag value.
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsEipsExample = new aws.dataAwsEips.DataAwsEips(this, "example", {
tags: {
Env: "dev",
},
});
new cdktf.TerraformOutput(this, "allocation_ids", {
value: dataAwsEipsExample.allocationIds,
});
new cdktf.TerraformOutput(this, "public_ips", {
value: dataAwsEipsExample.publicIps,
});
Argument Reference
filter
- (Optional) Custom filter block as described below.tags
- (Optional) 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) 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. An Elastic IP will be selected if any one of the given values matches.
Attributes Reference
id
- AWS Region.allocationIds
- List of all the allocation IDs for address for use with EC2-VPC.publicIps
- List of all the Elastic IP addresses.
Timeouts
read
- (Default20M
)