diff --git a/.changelog/28245.txt b/.changelog/28245.txt new file mode 100644 index 00000000000..58dc5465387 --- /dev/null +++ b/.changelog/28245.txt @@ -0,0 +1,7 @@ +```release-note:new-data-source +aws_ec2_public_ipv4_pools +``` + +```release-note:new-data-source +aws_ec2_public_ipv4_pool +``` \ No newline at end of file diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index 30c412c73bb..5d9d2cfaa5e 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -206,7 +206,7 @@ service/dynamodbstreams: service/ebs: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_ebs_' service/ec2: - - '((\*|-)\s*`?|(data|resource)\s+"?)aws_(ami|availability_zone|ec2_(availability|capacity|fleet|host|instance|serial|spot|tag)|eip|instance|key_pair|launch_template|placement_group|spot)' + - '((\*|-)\s*`?|(data|resource)\s+"?)aws_(ami|availability_zone|ec2_(availability|capacity|fleet|host|instance|public_ipv4_pool|serial|spot|tag)|eip|instance|key_pair|launch_template|placement_group|spot)' service/ec2ebs: - '((\*|-)\s*`?|(data|resource)\s+"?)aws_(ebs_|volume_attach|snapshot_create)' service/ec2instanceconnect: diff --git a/.github/labeler-pr-triage.yml b/.github/labeler-pr-triage.yml index 3f64aaf3729..9d842fb7884 100644 --- a/.github/labeler-pr-triage.yml +++ b/.github/labeler-pr-triage.yml @@ -346,6 +346,7 @@ service/ec2: - 'website/**/ec2_fleet*' - 'website/**/ec2_host*' - 'website/**/ec2_instance_*' + - 'website/**/ec2_public_ipv4_pool*' - 'website/**/ec2_serial_*' - 'website/**/ec2_spot_*' - 'website/**/ec2_tag*' diff --git a/internal/service/ec2/ec2_public_ipv4_pool_data_source.go b/internal/service/ec2/ec2_public_ipv4_pool_data_source.go new file mode 100644 index 00000000000..4099b783dd8 --- /dev/null +++ b/internal/service/ec2/ec2_public_ipv4_pool_data_source.go @@ -0,0 +1,139 @@ +package ec2 + +import ( + "context" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" +) + +// @SDKDataSource("aws_ec2_public_ipv4_pool") +func DataSourcePublicIPv4Pool() *schema.Resource { + return &schema.Resource{ + ReadWithoutTimeout: dataSourcePublicIPv4PoolRead, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Computed: true, + }, + "network_border_group": { + Type: schema.TypeString, + Computed: true, + }, + "pool_address_ranges": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "available_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "first_address": { + Type: schema.TypeString, + Computed: true, + }, + "last_address": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "pool_id": { + Type: schema.TypeString, + Required: true, + }, + "tags": tftags.TagsSchemaComputed(), + "total_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "total_available_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourcePublicIPv4PoolRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + var diags diag.Diagnostics + conn := meta.(*conns.AWSClient).EC2Conn() + ignoreTagsConfig := meta.(*conns.AWSClient).IgnoreTagsConfig + + poolID := d.Get("pool_id").(string) + pool, err := FindPublicIPv4PoolByID(ctx, conn, poolID) + + if err != nil { + return sdkdiag.AppendErrorf(diags, "reading EC2 Public IPv4 Pool (%s): %s", poolID, err) + } + + d.SetId(poolID) + d.Set("description", pool.Description) + d.Set("network_border_group", pool.NetworkBorderGroup) + if err := d.Set("pool_address_ranges", flattenPublicIPv4PoolRanges(pool.PoolAddressRanges)); err != nil { + return sdkdiag.AppendErrorf(diags, "setting pool_address_ranges: %s", err) + } + if err := d.Set("tags", KeyValueTags(ctx, pool.Tags).IgnoreAWS().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return sdkdiag.AppendErrorf(diags, "setting tags: %s", err) + } + d.Set("total_address_count", pool.TotalAddressCount) + d.Set("total_available_address_count", pool.TotalAvailableAddressCount) + + return nil +} + +func flattenPublicIPv4PoolRange(apiObject *ec2.PublicIpv4PoolRange) map[string]interface{} { + if apiObject == nil { + return nil + } + + tfMap := map[string]interface{}{} + + if v := apiObject.AddressCount; v != nil { + tfMap["address_count"] = aws.Int64Value(v) + } + + if v := apiObject.AvailableAddressCount; v != nil { + tfMap["available_address_count"] = aws.Int64Value(v) + } + + if v := apiObject.FirstAddress; v != nil { + tfMap["first_address"] = aws.StringValue(v) + } + + if v := apiObject.LastAddress; v != nil { + tfMap["last_address"] = aws.StringValue(v) + } + + return tfMap +} + +func flattenPublicIPv4PoolRanges(apiObjects []*ec2.PublicIpv4PoolRange) []interface{} { + if len(apiObjects) == 0 { + return nil + } + + var tfList []interface{} + + for _, apiObject := range apiObjects { + if apiObject == nil { + continue + } + + tfList = append(tfList, flattenPublicIPv4PoolRange(apiObject)) + } + + return tfList +} diff --git a/internal/service/ec2/ec2_public_ipv4_pool_data_source_test.go b/internal/service/ec2/ec2_public_ipv4_pool_data_source_test.go new file mode 100644 index 00000000000..95039a4c65a --- /dev/null +++ b/internal/service/ec2/ec2_public_ipv4_pool_data_source_test.go @@ -0,0 +1,59 @@ +package ec2_test + +import ( + "context" + "testing" + + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + tfec2 "github.com/hashicorp/terraform-provider-aws/internal/service/ec2" +) + +func TestAccEC2PublicIPv4PoolDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + dataSourceName := "data.aws_ec2_public_ipv4_pool.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t); testAccPreCheckPublicIPv4Pools(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, ec2.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testPublicIPv4PoolDataSourceConfig_basic, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceName, "total_address_count"), + resource.TestCheckResourceAttrSet(dataSourceName, "total_available_address_count"), + ), + }, + }, + }) +} + +func testAccPreCheckPublicIPv4Pools(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).EC2Conn() + + output, err := tfec2.FindPublicIPv4Pools(ctx, conn, &ec2.DescribePublicIpv4PoolsInput{}) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } + + // Ensure there is at least one pool. + if len(output) == 0 { + t.Skip("skipping since no EC2 Public IPv4 Pools found") + } +} + +const testPublicIPv4PoolDataSourceConfig_basic = ` +data "aws_ec2_public_ipv4_pools" "test" {} + +data "aws_ec2_public_ipv4_pool" "test" { + pool_id = data.aws_ec2_public_ipv4_pools.test.pool_ids[0] +} +` diff --git a/internal/service/ec2/ec2_public_ipv4_pools_data_source.go b/internal/service/ec2/ec2_public_ipv4_pools_data_source.go new file mode 100644 index 00000000000..712f6adb2d3 --- /dev/null +++ b/internal/service/ec2/ec2_public_ipv4_pools_data_source.go @@ -0,0 +1,66 @@ +package ec2 + +import ( + "context" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" +) + +// @SDKDataSource("aws_ec2_public_ipv4_pools") +func DataSourcePublicIPv4Pools() *schema.Resource { + return &schema.Resource{ + ReadWithoutTimeout: dataSourcePublicIPv4PoolsRead, + + Schema: map[string]*schema.Schema{ + "filter": DataSourceFiltersSchema(), + "pool_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tags": tftags.TagsSchemaComputed(), + }, + } +} + +func dataSourcePublicIPv4PoolsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + var diags diag.Diagnostics + conn := meta.(*conns.AWSClient).EC2Conn() + + input := &ec2.DescribePublicIpv4PoolsInput{} + + input.Filters = append(input.Filters, BuildTagFilterList( + Tags(tftags.New(ctx, d.Get("tags").(map[string]interface{}))), + )...) + + input.Filters = append(input.Filters, BuildFiltersDataSource( + d.Get("filter").(*schema.Set), + )...) + + if len(input.Filters) == 0 { + input.Filters = nil + } + + output, err := FindPublicIPv4Pools(ctx, conn, input) + + if err != nil { + return sdkdiag.AppendErrorf(diags, "reading EC2 Public IPv4 Pools: %s", err) + } + + var poolIDs []string + + for _, v := range output { + poolIDs = append(poolIDs, aws.StringValue(v.PoolId)) + } + + d.SetId(meta.(*conns.AWSClient).Region) + d.Set("pool_ids", poolIDs) + + return diags +} diff --git a/internal/service/ec2/ec2_public_ipv4_pools_data_source_test.go b/internal/service/ec2/ec2_public_ipv4_pools_data_source_test.go new file mode 100644 index 00000000000..8ae2ee7c74e --- /dev/null +++ b/internal/service/ec2/ec2_public_ipv4_pools_data_source_test.go @@ -0,0 +1,64 @@ +package ec2_test + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/ec2" + sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" +) + +func TestAccEC2PublicIPv4PoolsDataSource_basic(t *testing.T) { + ctx := acctest.Context(t) + dataSourceName := "data.aws_ec2_public_ipv4_pools.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, ec2.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testPublicIPv4PoolsDataSourceConfig_basic, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceName, "pool_ids.#"), + ), + }, + }, + }) +} + +func TestAccEC2PublicIPv4PoolsDataSource_tags(t *testing.T) { + ctx := acctest.Context(t) + dataSourceName := "data.aws_ec2_public_ipv4_pools.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, ec2.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testPublicIPv4PoolsDataSourceConfig_tags(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "pool_ids.#", "0"), + ), + }, + }, + }) +} + +const testPublicIPv4PoolsDataSourceConfig_basic = ` +data "aws_ec2_public_ipv4_pools" "test" {} +` + +func testPublicIPv4PoolsDataSourceConfig_tags(rName string) string { + return fmt.Sprintf(` +data "aws_ec2_public_ipv4_pools" "test" { + tags = { + Name = %[1]q + } +} +`, rName) +} diff --git a/internal/service/ec2/errors.go b/internal/service/ec2/errors.go index e22f30beb17..ef94bfc8167 100644 --- a/internal/service/ec2/errors.go +++ b/internal/service/ec2/errors.go @@ -68,6 +68,7 @@ const ( errCodeInvalidPoolIDNotFound = "InvalidPoolID.NotFound" errCodeInvalidPrefixListIDNotFound = "InvalidPrefixListID.NotFound" errCodeInvalidPrefixListIdNotFound = "InvalidPrefixListId.NotFound" + errCodeInvalidPublicIpv4PoolIDNotFound = "InvalidPublicIpv4PoolID.NotFound" // nosemgrep:ci.caps5-in-const-name,ci.caps5-in-var-name errCodeInvalidRouteNotFound = "InvalidRoute.NotFound" errCodeInvalidRouteTableIDNotFound = "InvalidRouteTableID.NotFound" errCodeInvalidRouteTableIdNotFound = "InvalidRouteTableId.NotFound" diff --git a/internal/service/ec2/find.go b/internal/service/ec2/find.go index 5f2d30bc36e..2373b2a325b 100644 --- a/internal/service/ec2/find.go +++ b/internal/service/ec2/find.go @@ -1257,6 +1257,78 @@ func FindInstanceTypeOfferings(ctx context.Context, conn *ec2.EC2, input *ec2.De return output, nil } +func FindPublicIPv4Pool(ctx context.Context, conn *ec2.EC2, input *ec2.DescribePublicIpv4PoolsInput) (*ec2.PublicIpv4Pool, error) { + output, err := FindPublicIPv4Pools(ctx, conn, input) + + if err != nil { + return nil, err + } + + if len(output) == 0 || output[0] == nil { + return nil, tfresource.NewEmptyResultError(input) + } + + if count := len(output); count > 1 { + return nil, tfresource.NewTooManyResultsError(count, input) + } + + return output[0], nil +} + +func FindPublicIPv4Pools(ctx context.Context, conn *ec2.EC2, input *ec2.DescribePublicIpv4PoolsInput) ([]*ec2.PublicIpv4Pool, error) { + var output []*ec2.PublicIpv4Pool + + err := conn.DescribePublicIpv4PoolsPagesWithContext(ctx, input, func(page *ec2.DescribePublicIpv4PoolsOutput, lastPage bool) bool { + if page == nil { + return !lastPage + } + + for _, v := range page.PublicIpv4Pools { + if v == nil { + continue + } + + output = append(output, v) + } + + return !lastPage + }) + + if tfawserr.ErrCodeEquals(err, errCodeInvalidPublicIpv4PoolIDNotFound) { + return nil, &resource.NotFoundError{ + LastError: err, + LastRequest: input, + } + } + + if err != nil { + return nil, err + } + + return output, nil +} + +func FindPublicIPv4PoolByID(ctx context.Context, conn *ec2.EC2, id string) (*ec2.PublicIpv4Pool, error) { + input := &ec2.DescribePublicIpv4PoolsInput{ + PoolIds: aws.StringSlice([]string{id}), + } + + output, err := FindPublicIPv4Pool(ctx, conn, input) + + if err != nil { + return nil, err + } + + // Eventual consistency check. + if aws.StringValue(output.PoolId) != id { + return nil, &resource.NotFoundError{ + LastRequest: input, + } + } + + return output, nil +} + func FindLocalGatewayRouteTables(ctx context.Context, conn *ec2.EC2, input *ec2.DescribeLocalGatewayRouteTablesInput) ([]*ec2.LocalGatewayRouteTable, error) { var output []*ec2.LocalGatewayRouteTable diff --git a/internal/service/ec2/service_package_gen.go b/internal/service/ec2/service_package_gen.go index ec2c9d41263..835f6a571d6 100644 --- a/internal/service/ec2/service_package_gen.go +++ b/internal/service/ec2/service_package_gen.go @@ -155,6 +155,14 @@ func (p *servicePackage) SDKDataSources(ctx context.Context) []*types.ServicePac Factory: DataSourceNetworkInsightsPath, TypeName: "aws_ec2_network_insights_path", }, + { + Factory: DataSourcePublicIPv4Pool, + TypeName: "aws_ec2_public_ipv4_pool", + }, + { + Factory: DataSourcePublicIPv4Pools, + TypeName: "aws_ec2_public_ipv4_pools", + }, { Factory: DataSourceSerialConsoleAccess, TypeName: "aws_ec2_serial_console_access", diff --git a/names/names_data.csv b/names/names_data.csv index 8da7cbcbb07..ef2b193f3d9 100644 --- a/names/names_data.csv +++ b/names/names_data.csv @@ -117,7 +117,7 @@ dax,dax,dax,dax,,dax,,,DAX,DAX,,1,,,aws_dax_,,dax_,DynamoDB Accelerator (DAX),Am dynamodbstreams,dynamodbstreams,dynamodbstreams,dynamodbstreams,,dynamodbstreams,,,DynamoDBStreams,DynamoDBStreams,,1,,,aws_dynamodbstreams_,,dynamodbstreams_,DynamoDB Streams,Amazon,,,,, ,,,,,ec2ebs,ec2,,EC2EBS,,,,,aws_(ebs_|volume_attach|snapshot_create),aws_ec2ebs_,ebs_,ebs_;volume_attachment;snapshot_,EBS (EC2),Amazon,x,x,,,Part of EC2 ebs,ebs,ebs,ebs,,ebs,,,EBS,EBS,,1,,,aws_ebs_,,changewhenimplemented,EBS (Elastic Block Store),Amazon,,,,, -ec2,ec2,ec2,ec2,,ec2,ec2,,EC2,EC2,,1,2,aws_(ami|availability_zone|ec2_(availability|capacity|fleet|host|instance|serial|spot|tag)|eip|instance|key_pair|launch_template|placement_group|spot),aws_ec2_,ec2_,ami;availability_zone;ec2_availability_;ec2_capacity_;ec2_fleet;ec2_host;ec2_instance_;ec2_serial_;ec2_spot_;ec2_tag;eip;instance;key_pair;launch_template;placement_group;spot_,EC2 (Elastic Compute Cloud),Amazon,,,,, +ec2,ec2,ec2,ec2,,ec2,ec2,,EC2,EC2,,1,2,aws_(ami|availability_zone|ec2_(availability|capacity|fleet|host|instance|public_ipv4_pool|serial|spot|tag)|eip|instance|key_pair|launch_template|placement_group|spot),aws_ec2_,ec2_,ami;availability_zone;ec2_availability_;ec2_capacity_;ec2_fleet;ec2_host;ec2_instance_;ec2_public_ipv4_pool;ec2_serial_;ec2_spot_;ec2_tag;eip;instance;key_pair;launch_template;placement_group;spot_,EC2 (Elastic Compute Cloud),Amazon,,,,, imagebuilder,imagebuilder,imagebuilder,imagebuilder,,imagebuilder,,,ImageBuilder,Imagebuilder,,1,,,aws_imagebuilder_,,imagebuilder_,EC2 Image Builder,Amazon,,,,, ec2-instance-connect,ec2instanceconnect,ec2instanceconnect,ec2instanceconnect,,ec2instanceconnect,,,EC2InstanceConnect,EC2InstanceConnect,,1,,,aws_ec2instanceconnect_,,ec2instanceconnect_,EC2 Instance Connect,AWS,,,,, ecr,ecr,ecr,ecr,,ecr,,,ECR,ECR,,1,,,aws_ecr_,,ecr_,ECR (Elastic Container Registry),Amazon,,,,, diff --git a/website/docs/d/ec2_public_ipv4_pool.html.markdown b/website/docs/d/ec2_public_ipv4_pool.html.markdown new file mode 100644 index 00000000000..f62cf07d828 --- /dev/null +++ b/website/docs/d/ec2_public_ipv4_pool.html.markdown @@ -0,0 +1,42 @@ +--- +subcategory: "EC2 (Elastic Compute Cloud)" +layout: "aws" +page_title: "AWS: aws_ec2_public_ipv4_pool" +description: |- + Provides details about a specific AWS EC2 Public IPv4 Pool. +--- + +# Data Source: aws_ec2_public_ipv4_pool + +Provides details about a specific AWS EC2 Public IPv4 Pool. + +## Example Usage + +### Basic Usage + +```terraform +data "aws_ec2_public_ipv4_pool" "example" { + pool_id = "ipv4pool-ec2-000df99cff0c1ec10" +} +``` + +## Argument Reference + +The following arguments are required: + +* `pool_id` - (Required) AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `description` - Description of the pool, if any. +* `network_border_group` - Name of the location from which the address pool is advertised. +* pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains: + * `address_count` - Number of addresses in the range. + * `available_address_count` - Number of available addresses in the range. + * `first_address` - First address in the range. + * `last_address` - Last address in the range. +* `tags` - Any tags for the address pool. +* `total_address_count` - Total number of addresses in the pool. +* `total_available_address_count` - Total number of available addresses in the pool. diff --git a/website/docs/d/ec2_public_ipv4_pools.html.markdown b/website/docs/d/ec2_public_ipv4_pools.html.markdown new file mode 100644 index 00000000000..409453dffce --- /dev/null +++ b/website/docs/d/ec2_public_ipv4_pools.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "EC2 (Elastic Compute Cloud)" +layout: "aws" +page_title: "AWS: aws_ec2_public_ipv4_pools" +description: |- + Terraform data source for getting information about AWS EC2 Public IPv4 Pools. +--- + +# Data Source: aws_ec2_public_ipv4_pools + +Terraform data source for getting information about AWS EC2 Public IPv4 Pools. + +## Example Usage + +### Basic Usage + +```terraform +# Returns all public IPv4 pools. +data "aws_ec2_public_ipv4_pools" "example" {} +``` + +### Usage with Filter + +```terraform +data "aws_ec2_public_ipv4_pools" "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](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribePublicIpv4Pools.html). +* `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 + +* `pool_ids` - List of all the pool IDs found.