1. Registry
  2. Packages
  3. Aiven Provider
  4. API Docs
  5. getTransitGatewayVpcAttachment
Viewing docs for Aiven v6.62.0
published on Thursday, Oct 22, 2026 by Pulumi
aiven logo aiven logo
Viewing docs for Aiven v6.62.0
published on Thursday, Oct 22, 2026 by Pulumi

    Gets information about an AWS Transit Gateway VPC attachment for an Aiven project VPC.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const example = aiven.getTransitGatewayVpcAttachment({
        vpcId: "example-project/example-vpc",
        peerCloudAccount: "123456789012",
        peerVpc: "tgw-0123456789abcdef0",
        peerRegion: "us-east-1",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example = aiven.get_transit_gateway_vpc_attachment(vpc_id="example-project/example-vpc",
        peer_cloud_account="123456789012",
        peer_vpc="tgw-0123456789abcdef0",
        peer_region="us-east-1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.GetTransitGatewayVpcAttachment(ctx, &aiven.LookupTransitGatewayVpcAttachmentArgs{
    			VpcId:            "example-project/example-vpc",
    			PeerCloudAccount: "123456789012",
    			PeerVpc:          "tgw-0123456789abcdef0",
    			PeerRegion:       pulumi.StringRef("us-east-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aiven.GetTransitGatewayVpcAttachment.Invoke(new()
        {
            VpcId = "example-project/example-vpc",
            PeerCloudAccount = "123456789012",
            PeerVpc = "tgw-0123456789abcdef0",
            PeerRegion = "us-east-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.AivenFunctions;
    import com.pulumi.aiven.inputs.GetTransitGatewayVpcAttachmentArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 = AivenFunctions.getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs.builder()
                .vpcId("example-project/example-vpc")
                .peerCloudAccount("123456789012")
                .peerVpc("tgw-0123456789abcdef0")
                .peerRegion("us-east-1")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aiven:getTransitGatewayVpcAttachment
          arguments:
            vpcId: example-project/example-vpc
            peerCloudAccount: '123456789012'
            peerVpc: tgw-0123456789abcdef0
            peerRegion: us-east-1
    
    terraform {
      required_providers {
        aiven = {
          source = "pulumi/aiven"
        }
      }
    }
    
    data "aiven_transit_gateway_vpc_attachment" "example" {
      vpc_id             = "example-project/example-vpc"
      peer_cloud_account = "123456789012"
      peer_vpc           = "tgw-0123456789abcdef0"
      peer_region        = "us-east-1"
    }
    

    Using getTransitGatewayVpcAttachment

    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 getTransitGatewayVpcAttachment(args: GetTransitGatewayVpcAttachmentArgs, opts?: InvokeOptions): Promise<GetTransitGatewayVpcAttachmentResult>
    function getTransitGatewayVpcAttachmentOutput(args: GetTransitGatewayVpcAttachmentOutputArgs, opts?: InvokeOutputOptions): Output<GetTransitGatewayVpcAttachmentResult>
    def get_transit_gateway_vpc_attachment(peer_cloud_account: Optional[str] = None,
                                           peer_region: Optional[str] = None,
                                           peer_vpc: Optional[str] = None,
                                           timeouts: Optional[GetTransitGatewayVpcAttachmentTimeouts] = None,
                                           vpc_id: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetTransitGatewayVpcAttachmentResult
    def get_transit_gateway_vpc_attachment_output(peer_cloud_account: pulumi.Input[Optional[str]] = None,
                                           peer_region: pulumi.Input[Optional[str]] = None,
                                           peer_vpc: pulumi.Input[Optional[str]] = None,
                                           timeouts: pulumi.Input[Optional[GetTransitGatewayVpcAttachmentTimeoutsArgs]] = None,
                                           vpc_id: pulumi.Input[Optional[str]] = None,
                                           opts: Optional[InvokeOutputOptions] = None) -> Output[GetTransitGatewayVpcAttachmentResult]
    func LookupTransitGatewayVpcAttachment(ctx *Context, args *LookupTransitGatewayVpcAttachmentArgs, opts ...InvokeOption) (*LookupTransitGatewayVpcAttachmentResult, error)
    func LookupTransitGatewayVpcAttachmentOutput(ctx *Context, args *LookupTransitGatewayVpcAttachmentOutputArgs, opts ...InvokeOption) LookupTransitGatewayVpcAttachmentResultOutput

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

    public static class GetTransitGatewayVpcAttachment 
    {
        public static Task<GetTransitGatewayVpcAttachmentResult> InvokeAsync(GetTransitGatewayVpcAttachmentArgs args, InvokeOptions? opts = null)
        public static Output<GetTransitGatewayVpcAttachmentResult> Invoke(GetTransitGatewayVpcAttachmentInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetTransitGatewayVpcAttachmentResult> Invoke(GetTransitGatewayVpcAttachmentInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetTransitGatewayVpcAttachmentResult> getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs args, InvokeOptions options)
    public static Output<GetTransitGatewayVpcAttachmentResult> getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs args, InvokeOptions options)
    public static Output<GetTransitGatewayVpcAttachmentResult> getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aiven:index/getTransitGatewayVpcAttachment:getTransitGatewayVpcAttachment
      arguments:
        # arguments dictionary
    data "aiven_get_transit_gateway_vpc_attachment" "name" {
        # arguments
    }

    The following arguments are supported:

    PeerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    PeerVpc string
    AWS Transit Gateway ID.
    VpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    PeerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    Timeouts GetTransitGatewayVpcAttachmentTimeouts
    PeerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    PeerVpc string
    AWS Transit Gateway ID.
    VpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    PeerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    Timeouts GetTransitGatewayVpcAttachmentTimeouts
    peer_cloud_account string
    AWS account ID that owns the Transit Gateway.
    peer_vpc string
    AWS Transit Gateway ID.
    vpc_id string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    peer_region string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    timeouts object
    peerCloudAccount String
    AWS account ID that owns the Transit Gateway.
    peerVpc String
    AWS Transit Gateway ID.
    vpcId String
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    peerRegion String
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    peerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    peerVpc string
    AWS Transit Gateway ID.
    vpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    peerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    peer_cloud_account str
    AWS account ID that owns the Transit Gateway.
    peer_vpc str
    AWS Transit Gateway ID.
    vpc_id str
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    peer_region str
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    peerCloudAccount String
    AWS account ID that owns the Transit Gateway.
    peerVpc String
    AWS Transit Gateway ID.
    vpcId String
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    peerRegion String
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    timeouts Property Map

    getTransitGatewayVpcAttachment Result

    The following output properties are available:

    Id string
    Terraform identifier for the VPC peering connection.
    PeerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    PeerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    PeerVpc string
    AWS Transit Gateway ID.
    PeeringConnectionId string
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    State string
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    StateInfo Dictionary<string, string>
    State-specific help or error information.
    UserPeerNetworkCidrs List<string>
    List of private IPv4 ranges to route through the peering connection.
    VpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    Timeouts GetTransitGatewayVpcAttachmentTimeouts
    Id string
    Terraform identifier for the VPC peering connection.
    PeerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    PeerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    PeerVpc string
    AWS Transit Gateway ID.
    PeeringConnectionId string
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    State string
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    StateInfo map[string]string
    State-specific help or error information.
    UserPeerNetworkCidrs []string
    List of private IPv4 ranges to route through the peering connection.
    VpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    Timeouts GetTransitGatewayVpcAttachmentTimeouts
    id string
    Terraform identifier for the VPC peering connection.
    peer_cloud_account string
    AWS account ID that owns the Transit Gateway.
    peer_region string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    peer_vpc string
    AWS Transit Gateway ID.
    peering_connection_id string
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    state string
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    state_info map(string)
    State-specific help or error information.
    user_peer_network_cidrs list(string)
    List of private IPv4 ranges to route through the peering connection.
    vpc_id string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    timeouts object
    id String
    Terraform identifier for the VPC peering connection.
    peerCloudAccount String
    AWS account ID that owns the Transit Gateway.
    peerRegion String
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    peerVpc String
    AWS Transit Gateway ID.
    peeringConnectionId String
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    state String
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    stateInfo Map<String,String>
    State-specific help or error information.
    userPeerNetworkCidrs List<String>
    List of private IPv4 ranges to route through the peering connection.
    vpcId String
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    id string
    Terraform identifier for the VPC peering connection.
    peerCloudAccount string
    AWS account ID that owns the Transit Gateway.
    peerRegion string
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    peerVpc string
    AWS Transit Gateway ID.
    peeringConnectionId string
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    state string
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    stateInfo {[key: string]: string}
    State-specific help or error information.
    userPeerNetworkCidrs string[]
    List of private IPv4 ranges to route through the peering connection.
    vpcId string
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    id str
    Terraform identifier for the VPC peering connection.
    peer_cloud_account str
    AWS account ID that owns the Transit Gateway.
    peer_region str
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    peer_vpc str
    AWS Transit Gateway ID.
    peering_connection_id str
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    state str
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    state_info Mapping[str, str]
    State-specific help or error information.
    user_peer_network_cidrs Sequence[str]
    List of private IPv4 ranges to route through the peering connection.
    vpc_id str
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    timeouts GetTransitGatewayVpcAttachmentTimeouts
    id String
    Terraform identifier for the VPC peering connection.
    peerCloudAccount String
    AWS account ID that owns the Transit Gateway.
    peerRegion String
    AWS region of the Transit Gateway. When omitted, the data source searches all regions and requires a single matching attachment.
    peerVpc String
    AWS Transit Gateway ID.
    peeringConnectionId String
    Legacy AWS VPC peering connection ID (pcx-*) for ordinary AWS VPC peering connections, if available. This is not the AWS Transit Gateway attachment ID; TGW attachment details are exposed in stateInfo.
    state String
    Project VPC peering connection state. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    stateInfo Map<String>
    State-specific help or error information.
    userPeerNetworkCidrs List<String>
    List of private IPv4 ranges to route through the peering connection.
    vpcId String
    Aiven project VPC ID in the PROJECT/VPC_ID format.
    timeouts Property Map

    Supporting Types

    GetTransitGatewayVpcAttachmentTimeouts

    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo aiven logo
    Viewing docs for Aiven v6.62.0
    published on Thursday, Oct 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial