AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.ec2transitgateway.getConnectPeer
Explore with Pulumi AI
Get information on an EC2 Transit Gateway Connect Peer.
Example Usage
By Filter
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"],
    }],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_connect_peer(filters=[{
    "name": "transit-gateway-attachment-id",
    "values": ["tgw-attach-12345678"],
}])
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/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
	})
}
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 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());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:ec2transitgateway:getConnectPeer
      arguments:
        filters:
          - name: transit-gateway-attachment-id
            values:
              - tgw-attach-12345678
By Identifier
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getConnectPeer({
    transitGatewayConnectPeerId: "tgw-connect-peer-12345678",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_connect_peer(transit_gateway_connect_peer_id="tgw-connect-peer-12345678")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/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
	})
}
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 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());
    }
}
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)
public static Output<GetConnectPeerResult> getConnectPeer(GetConnectPeerArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ec2transitgateway/getConnectPeer:getConnectPeer
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetConnect Peer Filter> 
- One or more configuration blocks containing name-values filters. Detailed below.
- Dictionary<string, string>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- TransitGateway stringConnect Peer Id 
- Identifier of the EC2 Transit Gateway Connect Peer.
- Filters
[]GetConnect Peer Filter 
- One or more configuration blocks containing name-values filters. Detailed below.
- map[string]string
- Key-value tags for the EC2 Transit Gateway Connect Peer
- TransitGateway stringConnect Peer Id 
- Identifier of the EC2 Transit Gateway Connect Peer.
- filters
List<GetConnect Peer Filter> 
- One or more configuration blocks containing name-values filters. Detailed below.
- Map<String,String>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway StringConnect Peer Id 
- Identifier of the EC2 Transit Gateway Connect Peer.
- filters
GetConnect Peer Filter[] 
- One or more configuration blocks containing name-values filters. Detailed below.
- {[key: string]: string}
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway stringConnect Peer Id 
- Identifier of the EC2 Transit Gateway Connect Peer.
- filters
Sequence[GetConnect Peer Filter] 
- One or more configuration blocks containing name-values filters. Detailed below.
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transit_gateway_ strconnect_ peer_ id 
- Identifier of the EC2 Transit Gateway Connect Peer.
- filters List<Property Map>
- One or more configuration blocks containing name-values filters. Detailed below.
- Map<String>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway StringConnect Peer Id 
- 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
- BgpPeer stringAddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- BgpTransit List<string>Gateway Addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- Id string
- The provider-assigned unique ID for this managed resource.
- InsideCidr List<string>Blocks 
- 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
- Dictionary<string, string>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- TransitGateway stringAddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- TransitGateway stringAttachment Id 
- The Transit Gateway Connect
- TransitGateway stringConnect Peer Id 
- Filters
List<GetConnect Peer Filter> 
- Arn string
- EC2 Transit Gateway Connect Peer ARN
- BgpAsn string
- BGP ASN number assigned customer device
- BgpPeer stringAddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- BgpTransit []stringGateway Addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- Id string
- The provider-assigned unique ID for this managed resource.
- InsideCidr []stringBlocks 
- 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
- map[string]string
- Key-value tags for the EC2 Transit Gateway Connect Peer
- TransitGateway stringAddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- TransitGateway stringAttachment Id 
- The Transit Gateway Connect
- TransitGateway stringConnect Peer Id 
- Filters
[]GetConnect Peer Filter 
- arn String
- EC2 Transit Gateway Connect Peer ARN
- bgpAsn String
- BGP ASN number assigned customer device
- bgpPeer StringAddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- bgpTransit List<String>Gateway Addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- id String
- The provider-assigned unique ID for this managed resource.
- insideCidr List<String>Blocks 
- 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
- Map<String,String>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway StringAddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- transitGateway StringAttachment Id 
- The Transit Gateway Connect
- transitGateway StringConnect Peer Id 
- filters
List<GetConnect Peer Filter> 
- arn string
- EC2 Transit Gateway Connect Peer ARN
- bgpAsn string
- BGP ASN number assigned customer device
- bgpPeer stringAddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- bgpTransit string[]Gateway Addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- id string
- The provider-assigned unique ID for this managed resource.
- insideCidr string[]Blocks 
- 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
- {[key: string]: string}
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway stringAddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- transitGateway stringAttachment Id 
- The Transit Gateway Connect
- transitGateway stringConnect Peer Id 
- filters
GetConnect Peer Filter[] 
- arn str
- EC2 Transit Gateway Connect Peer ARN
- bgp_asn str
- BGP ASN number assigned customer device
- bgp_peer_ straddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- bgp_transit_ Sequence[str]gateway_ addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- id str
- The provider-assigned unique ID for this managed resource.
- inside_cidr_ Sequence[str]blocks 
- 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
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transit_gateway_ straddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- transit_gateway_ strattachment_ id 
- The Transit Gateway Connect
- transit_gateway_ strconnect_ peer_ id 
- filters
Sequence[GetConnect Peer Filter] 
- arn String
- EC2 Transit Gateway Connect Peer ARN
- bgpAsn String
- BGP ASN number assigned customer device
- bgpPeer StringAddress 
- The IP address assigned to customer device, which is used as BGP IP address.
- bgpTransit List<String>Gateway Addresses 
- The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
- id String
- The provider-assigned unique ID for this managed resource.
- insideCidr List<String>Blocks 
- 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
- Map<String>
- Key-value tags for the EC2 Transit Gateway Connect Peer
- transitGateway StringAddress 
- The IP address assigned to Transit Gateway, which is used as tunnel endpoint.
- transitGateway StringAttachment Id 
- The Transit Gateway Connect
- transitGateway StringConnect Peer Id 
- filters List<Property Map>
Supporting Types
GetConnectPeerFilter   
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.