1. Packages
  2. Aiven
  3. API Docs
  4. getGcpVpcPeeringConnection
Aiven v6.7.2 published on Tuesday, Oct 31, 2023 by Pulumi

aiven.getGcpVpcPeeringConnection

Explore with Pulumi AI

aiven logo
Aiven v6.7.2 published on Tuesday, Oct 31, 2023 by Pulumi

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Aiven.GetGcpVpcPeeringConnection.Invoke(new()
        {
            VpcId = data.Aiven_project_vpc.Vpc.Id,
            GcpProjectId = "xxxx",
            PeerVpc = "xxxx",
        });
    
    });
    
    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.LookupGcpVpcPeeringConnection(ctx, &aiven.LookupGcpVpcPeeringConnectionArgs{
    			VpcId:        data.Aiven_project_vpc.Vpc.Id,
    			GcpProjectId: "xxxx",
    			PeerVpc:      "xxxx",
    		}, 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.GetGcpVpcPeeringConnectionArgs;
    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 foo = AivenFunctions.getGcpVpcPeeringConnection(GetGcpVpcPeeringConnectionArgs.builder()
                .vpcId(data.aiven_project_vpc().vpc().id())
                .gcpProjectId("xxxx")
                .peerVpc("xxxx")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aiven as aiven
    
    foo = aiven.get_gcp_vpc_peering_connection(vpc_id=data["aiven_project_vpc"]["vpc"]["id"],
        gcp_project_id="xxxx",
        peer_vpc="xxxx")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const foo = aiven.getGcpVpcPeeringConnection({
        vpcId: data.aiven_project_vpc.vpc.id,
        gcpProjectId: "xxxx",
        peerVpc: "xxxx",
    });
    
    variables:
      foo:
        fn::invoke:
          Function: aiven:getGcpVpcPeeringConnection
          Arguments:
            vpcId: ${data.aiven_project_vpc.vpc.id}
            gcpProjectId: xxxx
            peerVpc: xxxx
    

    Using getGcpVpcPeeringConnection

    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 getGcpVpcPeeringConnection(args: GetGcpVpcPeeringConnectionArgs, opts?: InvokeOptions): Promise<GetGcpVpcPeeringConnectionResult>
    function getGcpVpcPeeringConnectionOutput(args: GetGcpVpcPeeringConnectionOutputArgs, opts?: InvokeOptions): Output<GetGcpVpcPeeringConnectionResult>
    def get_gcp_vpc_peering_connection(gcp_project_id: Optional[str] = None,
                                       peer_vpc: Optional[str] = None,
                                       vpc_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetGcpVpcPeeringConnectionResult
    def get_gcp_vpc_peering_connection_output(gcp_project_id: Optional[pulumi.Input[str]] = None,
                                       peer_vpc: Optional[pulumi.Input[str]] = None,
                                       vpc_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetGcpVpcPeeringConnectionResult]
    func LookupGcpVpcPeeringConnection(ctx *Context, args *LookupGcpVpcPeeringConnectionArgs, opts ...InvokeOption) (*LookupGcpVpcPeeringConnectionResult, error)
    func LookupGcpVpcPeeringConnectionOutput(ctx *Context, args *LookupGcpVpcPeeringConnectionOutputArgs, opts ...InvokeOption) LookupGcpVpcPeeringConnectionResultOutput

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

    public static class GetGcpVpcPeeringConnection 
    {
        public static Task<GetGcpVpcPeeringConnectionResult> InvokeAsync(GetGcpVpcPeeringConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetGcpVpcPeeringConnectionResult> Invoke(GetGcpVpcPeeringConnectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGcpVpcPeeringConnectionResult> getGcpVpcPeeringConnection(GetGcpVpcPeeringConnectionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aiven:index/getGcpVpcPeeringConnection:getGcpVpcPeeringConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    PeerVpc string

    GCP VPC network name. 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.

    GcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    PeerVpc string

    GCP VPC network name. 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.

    gcpProjectId String

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    peerVpc String

    GCP VPC network name. 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.

    gcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    peerVpc string

    GCP VPC network name. 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.

    gcp_project_id str

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    peer_vpc str

    GCP VPC network name. 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.

    gcpProjectId String

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    peerVpc String

    GCP VPC network name. 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.

    getGcpVpcPeeringConnection Result

    The following output properties are available:

    GcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    PeerVpc string

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    SelfLink string

    Computed GCP network peering link

    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.

    GcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    PeerVpc string

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    SelfLink string

    Computed GCP network peering link

    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.

    gcpProjectId String

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    id String

    The provider-assigned unique ID for this managed resource.

    peerVpc String

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    selfLink String

    Computed GCP network peering link

    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.

    gcpProjectId string

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    id string

    The provider-assigned unique ID for this managed resource.

    peerVpc string

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    selfLink string

    Computed GCP network peering link

    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.

    gcp_project_id str

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    id str

    The provider-assigned unique ID for this managed resource.

    peer_vpc str

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    self_link str

    Computed GCP network peering link

    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.

    gcpProjectId String

    GCP project ID. This property cannot be changed, doing so forces recreation of the resource.

    id String

    The provider-assigned unique ID for this managed resource.

    peerVpc String

    GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.

    selfLink String

    Computed GCP network peering link

    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
    Aiven v6.7.2 published on Tuesday, Oct 31, 2023 by Pulumi