Aiven v6.44.0 published on Friday, Oct 10, 2025 by Pulumi
aiven.getTransitGatewayVpcAttachment
The Transit Gateway VPC Attachment resource allows the creation and management Transit Gateway VPC Attachment VPC peering connection between Aiven and AWS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const attachment = aiven.getTransitGatewayVpcAttachment({
    vpcId: bar.id,
    peerCloudAccount: "<PEER_ACCOUNT_ID>",
    peerVpc: "google-project1",
});
import pulumi
import pulumi_aiven as aiven
attachment = aiven.get_transit_gateway_vpc_attachment(vpc_id=bar["id"],
    peer_cloud_account="<PEER_ACCOUNT_ID>",
    peer_vpc="google-project1")
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.LookupTransitGatewayVpcAttachment(ctx, &aiven.LookupTransitGatewayVpcAttachmentArgs{
			VpcId:            bar.Id,
			PeerCloudAccount: "<PEER_ACCOUNT_ID>",
			PeerVpc:          "google-project1",
		}, 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 attachment = Aiven.GetTransitGatewayVpcAttachment.Invoke(new()
    {
        VpcId = bar.Id,
        PeerCloudAccount = "<PEER_ACCOUNT_ID>",
        PeerVpc = "google-project1",
    });
});
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.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 attachment = AivenFunctions.getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs.builder()
            .vpcId(bar.id())
            .peerCloudAccount("<PEER_ACCOUNT_ID>")
            .peerVpc("google-project1")
            .build());
    }
}
variables:
  attachment:
    fn::invoke:
      function: aiven:getTransitGatewayVpcAttachment
      arguments:
        vpcId: ${bar.id}
        peerCloudAccount: <PEER_ACCOUNT_ID>
        peerVpc: google-project1
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?: InvokeOptions): Output<GetTransitGatewayVpcAttachmentResult>def get_transit_gateway_vpc_attachment(peer_cloud_account: Optional[str] = None,
                                       peer_vpc: Optional[str] = None,
                                       vpc_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTransitGatewayVpcAttachmentResult
def get_transit_gateway_vpc_attachment_output(peer_cloud_account: Optional[pulumi.Input[str]] = None,
                                       peer_vpc: Optional[pulumi.Input[str]] = None,
                                       vpc_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = 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 CompletableFuture<GetTransitGatewayVpcAttachmentResult> getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs args, InvokeOptions options)
public static Output<GetTransitGatewayVpcAttachmentResult> getTransitGatewayVpcAttachment(GetTransitGatewayVpcAttachmentArgs args, InvokeOptions options)
fn::invoke:
  function: aiven:index/getTransitGatewayVpcAttachment:getTransitGatewayVpcAttachment
  arguments:
    # arguments dictionaryThe following arguments are supported:
- PeerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- PeerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- VpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- PeerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- PeerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- VpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- peerCloud StringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerVpc String
- Transit gateway ID. Changing this property forces recreation of the resource.
- vpcId String
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- peerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- vpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- peer_cloud_ straccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peer_vpc str
- Transit gateway ID. Changing this property forces recreation of the resource.
- vpc_id str
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- peerCloud StringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerVpc String
- Transit gateway ID. Changing this property forces recreation of the resource.
- vpcId String
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
getTransitGatewayVpcAttachment Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- PeerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- PeerRegion string
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- PeerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- PeeringConnection stringId 
- Cloud provider identifier for the peering connection if available
- State string
- State of the peering connection
- StateInfo Dictionary<string, string>
- State-specific help or error information
- UserPeer List<string>Network Cidrs 
- List of private IPv4 ranges to route through the peering connection
- VpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- PeerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- PeerRegion string
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- PeerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- PeeringConnection stringId 
- Cloud provider identifier for the peering connection if available
- State string
- State of the peering connection
- StateInfo map[string]string
- State-specific help or error information
- UserPeer []stringNetwork Cidrs 
- List of private IPv4 ranges to route through the peering connection
- VpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- peerCloud StringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerRegion String
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- peerVpc String
- Transit gateway ID. Changing this property forces recreation of the resource.
- peeringConnection StringId 
- Cloud provider identifier for the peering connection if available
- state String
- State of the peering connection
- stateInfo Map<String,String>
- State-specific help or error information
- userPeer List<String>Network Cidrs 
- List of private IPv4 ranges to route through the peering connection
- vpcId String
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- peerCloud stringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerRegion string
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- peerVpc string
- Transit gateway ID. Changing this property forces recreation of the resource.
- peeringConnection stringId 
- Cloud provider identifier for the peering connection if available
- state string
- State of the peering connection
- stateInfo {[key: string]: string}
- State-specific help or error information
- userPeer string[]Network Cidrs 
- List of private IPv4 ranges to route through the peering connection
- vpcId string
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- peer_cloud_ straccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peer_region str
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- peer_vpc str
- Transit gateway ID. Changing this property forces recreation of the resource.
- peering_connection_ strid 
- Cloud provider identifier for the peering connection if available
- state str
- State of the peering connection
- state_info Mapping[str, str]
- State-specific help or error information
- user_peer_ Sequence[str]network_ cidrs 
- List of private IPv4 ranges to route through the peering connection
- vpc_id str
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- peerCloud StringAccount 
- AWS account ID or GCP project ID of the peered VPC. Changing this property forces recreation of the resource.
- peerRegion String
- AWS region of the peered VPC (if not in the same region as Aiven VPC). This value can't be changed.
- peerVpc String
- Transit gateway ID. Changing this property forces recreation of the resource.
- peeringConnection StringId 
- Cloud provider identifier for the peering connection if available
- state String
- State of the peering connection
- stateInfo Map<String>
- State-specific help or error information
- userPeer List<String>Network Cidrs 
- List of private IPv4 ranges to route through the peering connection
- vpcId String
- The VPC the peering connection belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the aivenTerraform Provider.
