aws logo
AWS Classic v5.41.0, May 15 23

aws.ec2transitgateway.getConnectPeer

Explore with Pulumi AI

Get information on an EC2 Transit Gateway Connect Peer.

Example Usage

By Filter

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Ec2TransitGateway.GetConnectPeer.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Ec2TransitGateway.Inputs.GetConnectPeerFilterInputArgs
            {
                Name = "transit-gateway-attachment-id",
                Values = new[]
                {
                    "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{
				{
					Name: "transit-gateway-attachment-id",
					Values: []string{
						"tgw-attach-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetConnectPeerArgs;
import java.util.List;
import java.util.ArrayList;
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 example = 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 = 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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Ec2TransitGateway.GetConnectPeer.Invoke(new()
    {
        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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetConnectPeerArgs;
import java.util.List;
import java.util.ArrayList;
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 example = 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 = 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

BGP ASN number assigned customer device

Id string

The provider-assigned unique ID for this managed resource.

InsideCidrBlocks List<string>

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

PeerAddress string

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

BGP ASN number assigned customer device

Id string

The provider-assigned unique ID for this managed resource.

InsideCidrBlocks []string

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

PeerAddress string

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

BGP ASN number assigned customer device

id String

The provider-assigned unique ID for this managed resource.

insideCidrBlocks List<String>

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

peerAddress String

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

BGP ASN number assigned customer device

id string

The provider-assigned unique ID for this managed resource.

insideCidrBlocks string[]

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

peerAddress string

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

BGP ASN number assigned customer device

id str

The provider-assigned unique ID for this managed resource.

inside_cidr_blocks Sequence[str]

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

peer_address str

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

BGP ASN number assigned customer device

id String

The provider-assigned unique ID for this managed resource.

insideCidrBlocks List<String>

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

peerAddress String

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
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.