Skip to content

Data Source: awsEc2PublicIpv4Pools

Terraform data source for getting information about AWS EC2 Public IPv4 Pools.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEc2PublicIpv4Pools.DataAwsEc2PublicIpv4Pools(
  this,
  "example",
  {}
);

Usage with Filter

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEc2PublicIpv4Pools.DataAwsEc2PublicIpv4Pools(this, "example", {
  filter: [
    {
      name: "tag-key",
      values: ["ExampleTagKey"],
    },
  ],
});

Argument Reference

The following arguments are optional:

  • 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 pools.

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. Pool IDs will be selected if any one of the given values match.

Attributes Reference

  • poolIds - List of all the pool IDs found.