1. Registry
  2. Packages
  3. Aiven Provider
  4. API Docs
  5. getGcpOrgVpcPeeringConnection
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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const example = aiven.getGcpOrgVpcPeeringConnection({
        organizationId: "org1a23f456789",
        organizationVpcId: "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
        gcpProjectId: "my-gcp-project",
        peerVpc: "my-vpc",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example = aiven.get_gcp_org_vpc_peering_connection(organization_id="org1a23f456789",
        organization_vpc_id="1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
        gcp_project_id="my-gcp-project",
        peer_vpc="my-vpc")
    
    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.GetGcpOrgVpcPeeringConnection(ctx, &aiven.LookupGcpOrgVpcPeeringConnectionArgs{
    			OrganizationId:    "org1a23f456789",
    			OrganizationVpcId: "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    			GcpProjectId:      "my-gcp-project",
    			PeerVpc:           "my-vpc",
    		}, 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.GetGcpOrgVpcPeeringConnection.Invoke(new()
        {
            OrganizationId = "org1a23f456789",
            OrganizationVpcId = "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
            GcpProjectId = "my-gcp-project",
            PeerVpc = "my-vpc",
        });
    
    });
    
    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.GetGcpOrgVpcPeeringConnectionArgs;
    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.getGcpOrgVpcPeeringConnection(GetGcpOrgVpcPeeringConnectionArgs.builder()
                .organizationId("org1a23f456789")
                .organizationVpcId("1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d")
                .gcpProjectId("my-gcp-project")
                .peerVpc("my-vpc")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aiven:getGcpOrgVpcPeeringConnection
          arguments:
            organizationId: org1a23f456789
            organizationVpcId: 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
            gcpProjectId: my-gcp-project
            peerVpc: my-vpc
    
    terraform {
      required_providers {
        aiven = {
          source = "pulumi/aiven"
        }
      }
    }
    
    data "aiven_gcp_org_vpc_peering_connection" "example" {
      organization_id     = "org1a23f456789"
      organization_vpc_id = "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
      gcp_project_id      = "my-gcp-project"
      peer_vpc            = "my-vpc"
    }
    

    Using getGcpOrgVpcPeeringConnection

    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 getGcpOrgVpcPeeringConnection(args: GetGcpOrgVpcPeeringConnectionArgs, opts?: InvokeOptions): Promise<GetGcpOrgVpcPeeringConnectionResult>
    function getGcpOrgVpcPeeringConnectionOutput(args: GetGcpOrgVpcPeeringConnectionOutputArgs, opts?: InvokeOutputOptions): Output<GetGcpOrgVpcPeeringConnectionResult>
    def get_gcp_org_vpc_peering_connection(gcp_project_id: Optional[str] = None,
                                           organization_id: Optional[str] = None,
                                           organization_vpc_id: Optional[str] = None,
                                           peer_vpc: Optional[str] = None,
                                           timeouts: Optional[GetGcpOrgVpcPeeringConnectionTimeouts] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetGcpOrgVpcPeeringConnectionResult
    def get_gcp_org_vpc_peering_connection_output(gcp_project_id: pulumi.Input[Optional[str]] = None,
                                           organization_id: pulumi.Input[Optional[str]] = None,
                                           organization_vpc_id: pulumi.Input[Optional[str]] = None,
                                           peer_vpc: pulumi.Input[Optional[str]] = None,
                                           timeouts: pulumi.Input[Optional[GetGcpOrgVpcPeeringConnectionTimeoutsArgs]] = None,
                                           opts: Optional[InvokeOutputOptions] = None) -> Output[GetGcpOrgVpcPeeringConnectionResult]
    func LookupGcpOrgVpcPeeringConnection(ctx *Context, args *LookupGcpOrgVpcPeeringConnectionArgs, opts ...InvokeOption) (*LookupGcpOrgVpcPeeringConnectionResult, error)
    func LookupGcpOrgVpcPeeringConnectionOutput(ctx *Context, args *LookupGcpOrgVpcPeeringConnectionOutputArgs, opts ...InvokeOption) LookupGcpOrgVpcPeeringConnectionResultOutput

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

    public static class GetGcpOrgVpcPeeringConnection 
    {
        public static Task<GetGcpOrgVpcPeeringConnectionResult> InvokeAsync(GetGcpOrgVpcPeeringConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetGcpOrgVpcPeeringConnectionResult> Invoke(GetGcpOrgVpcPeeringConnectionInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetGcpOrgVpcPeeringConnectionResult> Invoke(GetGcpOrgVpcPeeringConnectionInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetGcpOrgVpcPeeringConnectionResult> getGcpOrgVpcPeeringConnection(GetGcpOrgVpcPeeringConnectionArgs args, InvokeOptions options)
    public static Output<GetGcpOrgVpcPeeringConnectionResult> getGcpOrgVpcPeeringConnection(GetGcpOrgVpcPeeringConnectionArgs args, InvokeOptions options)
    public static Output<GetGcpOrgVpcPeeringConnectionResult> getGcpOrgVpcPeeringConnection(GetGcpOrgVpcPeeringConnectionArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aiven:index/getGcpOrgVpcPeeringConnection:getGcpOrgVpcPeeringConnection
      arguments:
        # arguments dictionary
    data "aiven_get_gcp_org_vpc_peering_connection" "name" {
        # arguments
    }

    The following arguments are supported:

    GcpProjectId string
    Google Cloud project ID.
    OrganizationId string
    ID of an organization.
    OrganizationVpcId string
    Organization VPC ID.
    PeerVpc string
    Google Cloud VPC network name.
    Timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    GcpProjectId string
    Google Cloud project ID.
    OrganizationId string
    ID of an organization.
    OrganizationVpcId string
    Organization VPC ID.
    PeerVpc string
    Google Cloud VPC network name.
    Timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcp_project_id string
    Google Cloud project ID.
    organization_id string
    ID of an organization.
    organization_vpc_id string
    Organization VPC ID.
    peer_vpc string
    Google Cloud VPC network name.
    timeouts object
    gcpProjectId String
    Google Cloud project ID.
    organizationId String
    ID of an organization.
    organizationVpcId String
    Organization VPC ID.
    peerVpc String
    Google Cloud VPC network name.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcpProjectId string
    Google Cloud project ID.
    organizationId string
    ID of an organization.
    organizationVpcId string
    Organization VPC ID.
    peerVpc string
    Google Cloud VPC network name.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcp_project_id str
    Google Cloud project ID.
    organization_id str
    ID of an organization.
    organization_vpc_id str
    Organization VPC ID.
    peer_vpc str
    Google Cloud VPC network name.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcpProjectId String
    Google Cloud project ID.
    organizationId String
    ID of an organization.
    organizationVpcId String
    Organization VPC ID.
    peerVpc String
    Google Cloud VPC network name.
    timeouts Property Map

    getGcpOrgVpcPeeringConnection Result

    The following output properties are available:

    GcpProjectId string
    Google Cloud project ID.
    Id string
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    OrganizationId string
    ID of an organization.
    OrganizationVpcId string
    Organization VPC ID.
    PeerVpc string
    Google Cloud VPC network name.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    Timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    GcpProjectId string
    Google Cloud project ID.
    Id string
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    OrganizationId string
    ID of an organization.
    OrganizationVpcId string
    Organization VPC ID.
    PeerVpc string
    Google Cloud VPC network name.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    Timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcp_project_id string
    Google Cloud project ID.
    id string
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    organization_id string
    ID of an organization.
    organization_vpc_id string
    Organization VPC ID.
    peer_vpc string
    Google Cloud VPC network name.
    self_link string
    Computed Google Cloud network peering link.
    state string
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    timeouts object
    gcpProjectId String
    Google Cloud project ID.
    id String
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    organizationId String
    ID of an organization.
    organizationVpcId String
    Organization VPC ID.
    peerVpc String
    Google Cloud VPC network name.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcpProjectId string
    Google Cloud project ID.
    id string
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    organizationId string
    ID of an organization.
    organizationVpcId string
    Organization VPC ID.
    peerVpc string
    Google Cloud VPC network name.
    selfLink string
    Computed Google Cloud network peering link.
    state string
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcp_project_id str
    Google Cloud project ID.
    id str
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    organization_id str
    ID of an organization.
    organization_vpc_id str
    Organization VPC ID.
    peer_vpc str
    Google Cloud VPC network name.
    self_link str
    Computed Google Cloud network peering link.
    state str
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    timeouts GetGcpOrgVpcPeeringConnectionTimeouts
    gcpProjectId String
    Google Cloud project ID.
    id String
    Resource ID composed as: organization_id/organization_vpc_id/gcp_project_id/peer_vpc.
    organizationId String
    ID of an organization.
    organizationVpcId String
    Organization VPC ID.
    peerVpc String
    Google Cloud VPC network name.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection. The possible values are ACTIVE, APPROVED, APPROVED_PEER_REQUESTED, DELETED, DELETED_BY_PEER, DELETING, ERROR, INVALID_SPECIFICATION, PENDING_PEER and REJECTED_BY_PEER.
    timeouts Property Map

    Supporting Types

    GetGcpOrgVpcPeeringConnectionTimeouts

    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