1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. getConnect
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
aws-v6 logo
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi

    Get information on an EC2 Transit Gateway Connect.

    Example Usage

    By Filter

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ec2transitgateway.getConnect({
        filters: [{
            name: "transport-transit-gateway-attachment-id",
            values: ["tgw-attach-12345678"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.get_connect(filters=[{
        "name": "transport-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.LookupConnect(ctx, &ec2transitgateway.LookupConnectArgs{
    			Filters: []ec2transitgateway.GetConnectFilter{
    				{
    					Name: "transport-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.GetConnect.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ec2TransitGateway.Inputs.GetConnectFilterInputArgs
                {
                    Name = "transport-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.GetConnectArgs;
    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.getConnect(GetConnectArgs.builder()
                .filters(GetConnectFilterArgs.builder()
                    .name("transport-transit-gateway-attachment-id")
                    .values("tgw-attach-12345678")
                    .build())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:ec2transitgateway:getConnect
          arguments:
            filters:
              - name: transport-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.getConnect({
        transitGatewayConnectId: "tgw-attach-12345678",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.get_connect(transit_gateway_connect_id="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.LookupConnect(ctx, &ec2transitgateway.LookupConnectArgs{
    			TransitGatewayConnectId: pulumi.StringRef("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.GetConnect.Invoke(new()
        {
            TransitGatewayConnectId = "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.GetConnectArgs;
    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.getConnect(GetConnectArgs.builder()
                .transitGatewayConnectId("tgw-attach-12345678")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:ec2transitgateway:getConnect
          arguments:
            transitGatewayConnectId: tgw-attach-12345678
    

    Using getConnect

    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 getConnect(args: GetConnectArgs, opts?: InvokeOptions): Promise<GetConnectResult>
    function getConnectOutput(args: GetConnectOutputArgs, opts?: InvokeOptions): Output<GetConnectResult>
    def get_connect(filters: Optional[Sequence[GetConnectFilter]] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    transit_gateway_connect_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetConnectResult
    def get_connect_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetConnectFilterArgs]]]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    transit_gateway_connect_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetConnectResult]
    func LookupConnect(ctx *Context, args *LookupConnectArgs, opts ...InvokeOption) (*LookupConnectResult, error)
    func LookupConnectOutput(ctx *Context, args *LookupConnectOutputArgs, opts ...InvokeOption) LookupConnectResultOutput

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

    public static class GetConnect 
    {
        public static Task<GetConnectResult> InvokeAsync(GetConnectArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectResult> Invoke(GetConnectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectResult> getConnect(GetConnectArgs args, InvokeOptions options)
    public static Output<GetConnectResult> getConnect(GetConnectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ec2transitgateway/getConnect:getConnect
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetConnectFilter>
    One or more configuration blocks containing name-values filters. Detailed below.
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Connect
    TransitGatewayConnectId string
    Identifier of the EC2 Transit Gateway Connect.
    Filters []GetConnectFilter
    One or more configuration blocks containing name-values filters. Detailed below.
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Connect
    TransitGatewayConnectId string
    Identifier of the EC2 Transit Gateway Connect.
    filters List<GetConnectFilter>
    One or more configuration blocks containing name-values filters. Detailed below.
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Connect
    transitGatewayConnectId String
    Identifier of the EC2 Transit Gateway Connect.
    filters GetConnectFilter[]
    One or more configuration blocks containing name-values filters. Detailed below.
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Connect
    transitGatewayConnectId string
    Identifier of the EC2 Transit Gateway Connect.
    filters Sequence[GetConnectFilter]
    One or more configuration blocks containing name-values filters. Detailed below.
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Connect
    transit_gateway_connect_id str
    Identifier of the EC2 Transit Gateway Connect.
    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
    transitGatewayConnectId String
    Identifier of the EC2 Transit Gateway Connect.

    getConnect Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Protocol string
    Tunnel protocol
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Connect
    TransitGatewayConnectId string
    TransitGatewayId string
    EC2 Transit Gateway identifier
    TransportAttachmentId string
    The underlaying VPC attachment
    Filters List<GetConnectFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    Protocol string
    Tunnel protocol
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Connect
    TransitGatewayConnectId string
    TransitGatewayId string
    EC2 Transit Gateway identifier
    TransportAttachmentId string
    The underlaying VPC attachment
    Filters []GetConnectFilter
    id String
    The provider-assigned unique ID for this managed resource.
    protocol String
    Tunnel protocol
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Connect
    transitGatewayConnectId String
    transitGatewayId String
    EC2 Transit Gateway identifier
    transportAttachmentId String
    The underlaying VPC attachment
    filters List<GetConnectFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    protocol string
    Tunnel protocol
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Connect
    transitGatewayConnectId string
    transitGatewayId string
    EC2 Transit Gateway identifier
    transportAttachmentId string
    The underlaying VPC attachment
    filters GetConnectFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    protocol str
    Tunnel protocol
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Connect
    transit_gateway_connect_id str
    transit_gateway_id str
    EC2 Transit Gateway identifier
    transport_attachment_id str
    The underlaying VPC attachment
    filters Sequence[GetConnectFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    protocol String
    Tunnel protocol
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Connect
    transitGatewayConnectId String
    transitGatewayId String
    EC2 Transit Gateway identifier
    transportAttachmentId String
    The underlaying VPC attachment
    filters List<Property Map>

    Supporting Types

    GetConnectFilter

    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.
    aws-v6 logo
    AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate