AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 25, 2022 by Pulumi

getConnectPeer

Get information on an EC2 Transit Gateway Connect Peer.

Example Usage

By Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetConnectPeer.InvokeAsync(new Aws.Ec2TransitGateway.GetConnectPeerArgs
        {
            Filters = 
            {
                new Aws.Ec2TransitGateway.Inputs.GetConnectPeerFilterArgs
                {
                    Name = "transit-gateway-attachment-id",
                    Values = 
                    {
                        "tgw-attach-12345678",
                    },
                },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2transitgateway.LookupConnectPeer(ctx, &ec2transitgateway.LookupConnectPeerArgs{
			Filters: []ec2transitgateway.GetConnectPeerFilter{
				ec2transitgateway.GetConnectPeerFilter{
					Name: "transit-gateway-attachment-id",
					Values: []string{
						"tgw-attach-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(Ec2transitgatewayFunctions.getConnectPeer(GetConnectPeerArgs.builder()
            .filters(GetConnectPeerFilterArgs.builder()
                .name("transit-gateway-attachment-id")
                .values("tgw-attach-12345678")
                .build())
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_connect_peer(filters=[aws.ec2transitgateway.GetConnectPeerFilterArgs(
    name="transit-gateway-attachment-id",
    values=["tgw-attach-12345678"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getConnectPeer({
    filters: [{
        name: "transit-gateway-attachment-id",
        values: ["tgw-attach-12345678"],
    }],
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:ec2transitgateway:getConnectPeer
      Arguments:
        filters:
          - name: transit-gateway-attachment-id
            values:
              - tgw-attach-12345678

By Identifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetConnectPeer.InvokeAsync(new Aws.Ec2TransitGateway.GetConnectPeerArgs
        {
            TransitGatewayConnectPeerId = "tgw-connect-peer-12345678",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2transitgateway.LookupConnectPeer(ctx, &ec2transitgateway.LookupConnectPeerArgs{
			TransitGatewayConnectPeerId: pulumi.StringRef("tgw-connect-peer-12345678"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(Ec2transitgatewayFunctions.getConnectPeer(GetConnectPeerArgs.builder()
            .transitGatewayConnectPeerId("tgw-connect-peer-12345678")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_connect_peer(transit_gateway_connect_peer_id="tgw-connect-peer-12345678")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getConnectPeer({
    transitGatewayConnectPeerId: "tgw-connect-peer-12345678",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:ec2transitgateway:getConnectPeer
      Arguments:
        transitGatewayConnectPeerId: tgw-connect-peer-12345678

Using getConnectPeer

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 getConnectPeer(args: GetConnectPeerArgs, opts?: InvokeOptions): Promise<GetConnectPeerResult>
function getConnectPeerOutput(args: GetConnectPeerOutputArgs, opts?: InvokeOptions): Output<GetConnectPeerResult>
def get_connect_peer(filters: Optional[Sequence[GetConnectPeerFilter]] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     transit_gateway_connect_peer_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetConnectPeerResult
def get_connect_peer_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetConnectPeerFilterArgs]]]] = None,
                     tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                     transit_gateway_connect_peer_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetConnectPeerResult]
func LookupConnectPeer(ctx *Context, args *LookupConnectPeerArgs, opts ...InvokeOption) (*LookupConnectPeerResult, error)
func LookupConnectPeerOutput(ctx *Context, args *LookupConnectPeerOutputArgs, opts ...InvokeOption) LookupConnectPeerResultOutput

> Note: This function is named LookupConnectPeer in the Go SDK.

public static class GetConnectPeer 
{
    public static Task<GetConnectPeerResult> InvokeAsync(GetConnectPeerArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectPeerResult> Invoke(GetConnectPeerInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectPeerResult> getConnectPeer(GetConnectPeerArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2transitgateway/getConnectPeer:getConnectPeer
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<GetConnectPeerFilter>

One or more configuration blocks containing name-values filters. Detailed below.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Connect Peer

TransitGatewayConnectPeerId string

Identifier of the EC2 Transit Gateway Connect Peer.

Filters []GetConnectPeerFilter

One or more configuration blocks containing name-values filters. Detailed below.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Connect Peer

TransitGatewayConnectPeerId string

Identifier of the EC2 Transit Gateway Connect Peer.

filters List<GetConnectPeerFilter>

One or more configuration blocks containing name-values filters. Detailed below.

tags Map<String,String>

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayConnectPeerId String

Identifier of the EC2 Transit Gateway Connect Peer.

filters GetConnectPeerFilter[]

One or more configuration blocks containing name-values filters. Detailed below.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayConnectPeerId string

Identifier of the EC2 Transit Gateway Connect Peer.

filters Sequence[GetConnectPeerFilter]

One or more configuration blocks containing name-values filters. Detailed below.

tags Mapping[str, str]

Key-value tags for the EC2 Transit Gateway Connect Peer

transit_gateway_connect_peer_id str

Identifier of the EC2 Transit Gateway Connect Peer.

filters List<Property Map>

One or more configuration blocks containing name-values filters. Detailed below.

tags Map<String>

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayConnectPeerId String

Identifier of the EC2 Transit Gateway Connect Peer.

getConnectPeer Result

The following output properties are available:

Arn string

EC2 Transit Gateway Connect Peer ARN

BgpAsn string

The BGP ASN number assigned customer device

Id string

The provider-assigned unique ID for this managed resource.

InsideCidrBlocks List<string>

The CIDR blocks that will be used for addressing within the tunnel.

PeerAddress string

The IP addressed assigned to customer device, which is used as tunnel endpoint

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Connect Peer

TransitGatewayAddress string

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

TransitGatewayAttachmentId string

The Transit Gateway Connect

TransitGatewayConnectPeerId string
Filters List<GetConnectPeerFilter>
Arn string

EC2 Transit Gateway Connect Peer ARN

BgpAsn string

The BGP ASN number assigned customer device

Id string

The provider-assigned unique ID for this managed resource.

InsideCidrBlocks []string

The CIDR blocks that will be used for addressing within the tunnel.

PeerAddress string

The IP addressed assigned to customer device, which is used as tunnel endpoint

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Connect Peer

TransitGatewayAddress string

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

TransitGatewayAttachmentId string

The Transit Gateway Connect

TransitGatewayConnectPeerId string
Filters []GetConnectPeerFilter
arn String

EC2 Transit Gateway Connect Peer ARN

bgpAsn String

The BGP ASN number assigned customer device

id String

The provider-assigned unique ID for this managed resource.

insideCidrBlocks List<String>

The CIDR blocks that will be used for addressing within the tunnel.

peerAddress String

The IP addressed assigned to customer device, which is used as tunnel endpoint

tags Map<String,String>

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayAddress String

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

transitGatewayAttachmentId String

The Transit Gateway Connect

transitGatewayConnectPeerId String
filters List<GetConnectPeerFilter>
arn string

EC2 Transit Gateway Connect Peer ARN

bgpAsn string

The BGP ASN number assigned customer device

id string

The provider-assigned unique ID for this managed resource.

insideCidrBlocks string[]

The CIDR blocks that will be used for addressing within the tunnel.

peerAddress string

The IP addressed assigned to customer device, which is used as tunnel endpoint

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayAddress string

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

transitGatewayAttachmentId string

The Transit Gateway Connect

transitGatewayConnectPeerId string
filters GetConnectPeerFilter[]
arn str

EC2 Transit Gateway Connect Peer ARN

bgp_asn str

The BGP ASN number assigned customer device

id str

The provider-assigned unique ID for this managed resource.

inside_cidr_blocks Sequence[str]

The CIDR blocks that will be used for addressing within the tunnel.

peer_address str

The IP addressed assigned to customer device, which is used as tunnel endpoint

tags Mapping[str, str]

Key-value tags for the EC2 Transit Gateway Connect Peer

transit_gateway_address str

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

transit_gateway_attachment_id str

The Transit Gateway Connect

transit_gateway_connect_peer_id str
filters Sequence[GetConnectPeerFilter]
arn String

EC2 Transit Gateway Connect Peer ARN

bgpAsn String

The BGP ASN number assigned customer device

id String

The provider-assigned unique ID for this managed resource.

insideCidrBlocks List<String>

The CIDR blocks that will be used for addressing within the tunnel.

peerAddress String

The IP addressed assigned to customer device, which is used as tunnel endpoint

tags Map<String>

Key-value tags for the EC2 Transit Gateway Connect Peer

transitGatewayAddress String

The IP address assigned to Transit Gateway, which is used as tunnel endpoint.

transitGatewayAttachmentId String

The Transit Gateway Connect

transitGatewayConnectPeerId String
filters List<Property Map>

Supporting Types

GetConnectPeerFilter

Name string

Name of the filter.

Values List<string>

List of one or more values for the filter.

Name string

Name of the filter.

Values []string

List of one or more values for the filter.

name String

Name of the filter.

values List<String>

List of one or more values for the filter.

name string

Name of the filter.

values string[]

List of one or more values for the filter.

name str

Name of the filter.

values Sequence[str]

List of one or more values for the filter.

name String

Name of the filter.

values List<String>

List of one or more values for the filter.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.