published on Wednesday, Oct 28, 2026 by Pulumi
published on Wednesday, Oct 28, 2026 by Pulumi
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.
Example Usage
The following example returns a specific CoIP pool ID
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const coipPoolId = config.requireObject<any>("coipPoolId");
const selected = aws.ec2.getCoipPool({
id: coipPoolId,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
coip_pool_id = config.require_object("coipPoolId")
selected = aws.ec2.get_coip_pool(id=coip_pool_id)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
var coipPoolId interface{}
cfg.RequireObject("coipPoolId", &coipPoolId)
_, err := ec2.GetCoipPool(ctx, &ec2.GetCoipPoolArgs{
Id: coipPoolId,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var coipPoolId = config.RequireObject<dynamic>("coipPoolId");
var selected = Aws.Ec2.GetCoipPool.Invoke(new()
{
Id = coipPoolId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCoipPoolArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var coipPoolId = config.requireObject("coipPoolId", com.pulumi.core.TypeShape.map(String.class, Object.class));
final var selected = Ec2Functions.getCoipPool(GetCoipPoolArgs.builder()
.id(coipPoolId)
.build());
}
}
configuration:
coipPoolId:
type: object
variables:
selected:
fn::invoke:
function: aws:ec2:getCoipPool
arguments:
id: ${coipPoolId}
terraform {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_coip_pool" "selected" {
id = var.coipPoolId
}
variable "coipPoolId" {
type = any
}
Using getCoipPool
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCoipPool(args: GetCoipPoolArgs, opts?: InvokeOptions): Promise<GetCoipPoolResult>
function getCoipPoolOutput(args: GetCoipPoolOutputArgs, opts?: InvokeOutputOptions): Output<GetCoipPoolResult>def get_coip_pool(filters: Optional[Sequence[GetCoipPoolFilter]] = None,
local_gateway_route_table_id: Optional[str] = None,
pool_id: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetCoipPoolResult
def get_coip_pool_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetCoipPoolFilterArgs]]]] = None,
local_gateway_route_table_id: pulumi.Input[Optional[str]] = None,
pool_id: pulumi.Input[Optional[str]] = None,
region: pulumi.Input[Optional[str]] = None,
tags: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetCoipPoolResult]func GetCoipPool(ctx *Context, args *GetCoipPoolArgs, opts ...InvokeOption) (*GetCoipPoolResult, error)
func GetCoipPoolOutput(ctx *Context, args *GetCoipPoolOutputArgs, opts ...InvokeOption) GetCoipPoolResultOutput> Note: This function is named GetCoipPool in the Go SDK.
public static class GetCoipPool
{
public static Task<GetCoipPoolResult> InvokeAsync(GetCoipPoolArgs args, InvokeOptions? opts = null)
public static Output<GetCoipPoolResult> Invoke(GetCoipPoolInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetCoipPoolResult> Invoke(GetCoipPoolInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetCoipPoolResult> getCoipPool(GetCoipPoolArgs args, InvokeOptions options)
public static Output<GetCoipPoolResult> getCoipPool(GetCoipPoolArgs args, InvokeOptions options)
public static Output<GetCoipPoolResult> getCoipPool(GetCoipPoolArgs args, InvokeOutputOptions options)
fn::invoke:
function: aws:ec2/getCoipPool:getCoipPool
arguments:
# arguments dictionarydata "aws_ec2_get_coip_pool" "name" {
# arguments
}The following arguments are supported:
- Filters
List<Get
Coip Pool Filter> - Local
Gateway stringRoute Table Id - Local Gateway Route Table ID assigned to desired CoIP Pool
- Pool
Id string - ID of the specific CoIP Pool to retrieve.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
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
filtersub-blocks, which take the following arguments:
- Filters
[]Get
Coip Pool Filter - Local
Gateway stringRoute Table Id - Local Gateway Route Table ID assigned to desired CoIP Pool
- Pool
Id string - ID of the specific CoIP Pool to retrieve.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
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
filtersub-blocks, which take the following arguments:
- filters list(object)
- local_
gateway_ stringroute_ table_ id - Local Gateway Route Table ID assigned to desired CoIP Pool
- pool_
id string - ID of the specific CoIP Pool to retrieve.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map(string)
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
filtersub-blocks, which take the following arguments:
- filters
List<Get
Coip Pool Filter> - local
Gateway StringRoute Table Id - Local Gateway Route Table ID assigned to desired CoIP Pool
- pool
Id String - ID of the specific CoIP Pool to retrieve.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
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
filtersub-blocks, which take the following arguments:
- filters
Get
Coip Pool Filter[] - local
Gateway stringRoute Table Id - Local Gateway Route Table ID assigned to desired CoIP Pool
- pool
Id string - ID of the specific CoIP Pool to retrieve.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
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
filtersub-blocks, which take the following arguments:
- filters
Sequence[Get
Coip Pool Filter] - local_
gateway_ strroute_ table_ id - Local Gateway Route Table ID assigned to desired CoIP Pool
- pool_
id str - ID of the specific CoIP Pool to retrieve.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
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
filtersub-blocks, which take the following arguments:
- filters List<Property Map>
- local
Gateway StringRoute Table Id - Local Gateway Route Table ID assigned to desired CoIP Pool
- pool
Id String - ID of the specific CoIP Pool to retrieve.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
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
filtersub-blocks, which take the following arguments:
getCoipPool Result
The following output properties are available:
- Arn string
- ARN of the CoIP pool
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Gateway stringRoute Table Id - Pool
Cidrs List<string> - Set of CIDR blocks in pool
- Pool
Id string - Region string
- Dictionary<string, string>
- Filters
List<Get
Coip Pool Filter>
- Arn string
- ARN of the CoIP pool
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Gateway stringRoute Table Id - Pool
Cidrs []string - Set of CIDR blocks in pool
- Pool
Id string - Region string
- map[string]string
- Filters
[]Get
Coip Pool Filter
- arn string
- ARN of the CoIP pool
- id string
- The provider-assigned unique ID for this managed resource.
- local_
gateway_ stringroute_ table_ id - pool_
cidrs list(string) - Set of CIDR blocks in pool
- pool_
id string - region string
- map(string)
- filters list(object)
- arn String
- ARN of the CoIP pool
- id String
- The provider-assigned unique ID for this managed resource.
- local
Gateway StringRoute Table Id - pool
Cidrs List<String> - Set of CIDR blocks in pool
- pool
Id String - region String
- Map<String,String>
- filters
List<Get
Coip Pool Filter>
- arn string
- ARN of the CoIP pool
- id string
- The provider-assigned unique ID for this managed resource.
- local
Gateway stringRoute Table Id - pool
Cidrs string[] - Set of CIDR blocks in pool
- pool
Id string - region string
- {[key: string]: string}
- filters
Get
Coip Pool Filter[]
- arn str
- ARN of the CoIP pool
- id str
- The provider-assigned unique ID for this managed resource.
- local_
gateway_ strroute_ table_ id - pool_
cidrs Sequence[str] - Set of CIDR blocks in pool
- pool_
id str - region str
- Mapping[str, str]
- filters
Sequence[Get
Coip Pool Filter]
- arn String
- ARN of the CoIP pool
- id String
- The provider-assigned unique ID for this managed resource.
- local
Gateway StringRoute Table Id - pool
Cidrs List<String> - Set of CIDR blocks in pool
- pool
Id String - region String
- Map<String>
- filters List<Property Map>
Supporting Types
GetCoipPoolFilter
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values []string
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- name string
- Name of the field to filter by, as defined by the underlying AWS API.
- values list(string)
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- name string
- Name of the field to filter by, as defined by the underlying AWS API.
- values string[]
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- name str
- Name of the field to filter by, as defined by the underlying AWS API.
- values Sequence[str]
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A CoIP Pool will be selected if any one of the given values matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Wednesday, Oct 28, 2026 by Pulumi