-
Notifications
You must be signed in to change notification settings - Fork 151
/
getCoipPool.go
74 lines (69 loc) · 2.29 KB
/
getCoipPool.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ec2
import (
"github.com/pulumi/pulumi/sdk/v3/go/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
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/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, "")
// coipPoolId := cfg.RequireObject("coipPoolId")
// _, err := ec2.GetCoipPool(ctx, &ec2.GetCoipPoolArgs{
// Id: coipPoolId,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func GetCoipPool(ctx *pulumi.Context, args *GetCoipPoolArgs, opts ...pulumi.InvokeOption) (*GetCoipPoolResult, error) {
var rv GetCoipPoolResult
err := ctx.Invoke("aws:ec2/getCoipPool:getCoipPool", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCoipPool.
type GetCoipPoolArgs struct {
Filters []GetCoipPoolFilter `pulumi:"filters"`
// Local Gateway Route Table Id assigned to desired COIP Pool
LocalGatewayRouteTableId *string `pulumi:"localGatewayRouteTableId"`
// The id of the specific COIP Pool to retrieve.
PoolId *string `pulumi:"poolId"`
// A mapping of tags, each pair of which must exactly match
// a pair on the desired COIP Pool.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getCoipPool.
type GetCoipPoolResult struct {
Filters []GetCoipPoolFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
LocalGatewayRouteTableId string `pulumi:"localGatewayRouteTableId"`
// Set of CIDR blocks in pool
PoolCidrs []string `pulumi:"poolCidrs"`
PoolId string `pulumi:"poolId"`
Tags map[string]string `pulumi:"tags"`
}