1. Packages
  2. Packages
  3. Aiven Provider
  4. API Docs
  5. getVpcPeeringConnection
Viewing docs for Aiven v5.6.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
aiven logo
Viewing docs for Aiven v5.6.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    The VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var mypeeringconnection = Aiven.GetVpcPeeringConnection.Invoke(new()
        {
            VpcId = aiven_project_vpc.Myvpc.Id,
            PeerCloudAccount = "<PEER_ACCOUNT_ID>",
            PeerVpc = "<PEER_VPC_ID/NAME>",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v5/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.LookupVpcPeeringConnection(ctx, &aiven.LookupVpcPeeringConnectionArgs{
    			VpcId:            aiven_project_vpc.Myvpc.Id,
    			PeerCloudAccount: "<PEER_ACCOUNT_ID>",
    			PeerVpc:          "<PEER_VPC_ID/NAME>",
    		}, 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.aiven.AivenFunctions;
    import com.pulumi.aiven.inputs.GetVpcPeeringConnectionArgs;
    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 mypeeringconnection = AivenFunctions.getVpcPeeringConnection(GetVpcPeeringConnectionArgs.builder()
                .vpcId(aiven_project_vpc.myvpc().id())
                .peerCloudAccount("<PEER_ACCOUNT_ID>")
                .peerVpc("<PEER_VPC_ID/NAME>")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const mypeeringconnection = aiven.getVpcPeeringConnection({
        vpcId: aiven_project_vpc.myvpc.id,
        peerCloudAccount: "<PEER_ACCOUNT_ID>",
        peerVpc: "<PEER_VPC_ID/NAME>",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    mypeeringconnection = aiven.get_vpc_peering_connection(vpc_id=aiven_project_vpc["myvpc"]["id"],
        peer_cloud_account="<PEER_ACCOUNT_ID>",
        peer_vpc="<PEER_VPC_ID/NAME>")
    
    variables:
      mypeeringconnection:
        fn::invoke:
          Function: aiven:getVpcPeeringConnection
          Arguments:
            vpcId: ${aiven_project_vpc.myvpc.id}
            peerCloudAccount: <PEER_ACCOUNT_ID>
            peerVpc: <PEER_VPC_ID/NAME>
    

    Using getVpcPeeringConnection

    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 getVpcPeeringConnection(args: GetVpcPeeringConnectionArgs, opts?: InvokeOptions): Promise<GetVpcPeeringConnectionResult>
    function getVpcPeeringConnectionOutput(args: GetVpcPeeringConnectionOutputArgs, opts?: InvokeOptions): Output<GetVpcPeeringConnectionResult>
    def get_vpc_peering_connection(peer_cloud_account: Optional[str] = None,
                                   peer_vpc: Optional[str] = None,
                                   vpc_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetVpcPeeringConnectionResult
    def get_vpc_peering_connection_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[GetVpcPeeringConnectionResult]
    func LookupVpcPeeringConnection(ctx *Context, args *LookupVpcPeeringConnectionArgs, opts ...InvokeOption) (*LookupVpcPeeringConnectionResult, error)
    func LookupVpcPeeringConnectionOutput(ctx *Context, args *LookupVpcPeeringConnectionOutputArgs, opts ...InvokeOption) LookupVpcPeeringConnectionResultOutput

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

    public static class GetVpcPeeringConnection 
    {
        public static Task<GetVpcPeeringConnectionResult> InvokeAsync(GetVpcPeeringConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcPeeringConnectionResult> Invoke(GetVpcPeeringConnectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcPeeringConnectionResult> getVpcPeeringConnection(GetVpcPeeringConnectionArgs args, InvokeOptions options)
    public static Output<GetVpcPeeringConnectionResult> getVpcPeeringConnection(GetVpcPeeringConnectionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aiven:index/getVpcPeeringConnection:getVpcPeeringConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PeerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    PeerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount String
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerVpc String
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    vpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    peer_cloud_account str
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peer_vpc str
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    vpc_id str
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount String
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerVpc String
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.

    getVpcPeeringConnection Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PeerAzureAppId string
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    PeerAzureTenantId string
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    PeerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeerRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    PeerResourceGroup string
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    PeerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeeringConnectionId string
    Cloud provider identifier for the peering connection if available
    State string
    State of the peering connection
    StateInfo Dictionary<string, object>
    State-specific help or error information
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerAzureAppId string
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    PeerAzureTenantId string
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    PeerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeerRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    PeerResourceGroup string
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    PeerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    PeeringConnectionId string
    Cloud provider identifier for the peering connection if available
    State string
    State of the peering connection
    StateInfo map[string]interface{}
    State-specific help or error information
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    peerAzureAppId String
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    peerAzureTenantId String
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount String
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    peerResourceGroup String
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    peerVpc String
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peeringConnectionId String
    Cloud provider identifier for the peering connection if available
    state String
    State of the peering connection
    stateInfo Map<String,Object>
    State-specific help or error information
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    peerAzureAppId string
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    peerAzureTenantId string
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount string
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    peerResourceGroup string
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    peerVpc string
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peeringConnectionId string
    Cloud provider identifier for the peering connection if available
    state string
    State of the peering connection
    stateInfo {[key: string]: any}
    State-specific help or error information
    vpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    peer_azure_app_id str
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    peer_azure_tenant_id str
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    peer_cloud_account str
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peer_region str
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    peer_resource_group str
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    peer_vpc str
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peering_connection_id str
    Cloud provider identifier for the peering connection if available
    state str
    State of the peering connection
    state_info Mapping[str, Any]
    State-specific help or error information
    vpc_id str
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    peerAzureAppId String
    Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet This property cannot be changed, doing so forces recreation of the resource.
    peerAzureTenantId String
    Azure tenant id in UUID4 form. This property cannot be changed, doing so forces recreation of the resource.
    peerCloudAccount String
    AWS account ID or GCP project ID of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peerRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    peerResourceGroup String
    Azure resource group name of the peered VPC This property cannot be changed, doing so forces recreation of the resource.
    peerVpc String
    AWS VPC ID or GCP VPC network name of the peered VPC. This property cannot be changed, doing so forces recreation of the resource.
    peeringConnectionId String
    Cloud provider identifier for the peering connection if available
    state String
    State of the peering connection
    stateInfo Map<Any>
    State-specific help or error information
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Viewing docs for Aiven v5.6.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.