Aiven v6.44.0 published on Friday, Oct 10, 2025 by Pulumi
aiven.getGcpVpcPeeringConnection
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 main = aiven.getGcpVpcPeeringConnection({
vpcId: vpc.id,
gcpProjectId: "example-project",
peerVpc: "example-network",
});
import pulumi
import pulumi_aiven as aiven
main = aiven.get_gcp_vpc_peering_connection(vpc_id=vpc["id"],
gcp_project_id="example-project",
peer_vpc="example-network")
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: vpc.Id,
GcpProjectId: "example-project",
PeerVpc: "example-network",
}, 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 main = Aiven.GetGcpVpcPeeringConnection.Invoke(new()
{
VpcId = vpc.Id,
GcpProjectId = "example-project",
PeerVpc = "example-network",
});
});
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 main = AivenFunctions.getGcpVpcPeeringConnection(GetGcpVpcPeeringConnectionArgs.builder()
.vpcId(vpc.id())
.gcpProjectId("example-project")
.peerVpc("example-network")
.build());
}
}
variables:
main:
fn::invoke:
function: aiven:getGcpVpcPeeringConnection
arguments:
vpcId: ${vpc.id}
gcpProjectId: example-project
peerVpc: example-network
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)
public static Output<GetGcpVpcPeeringConnectionResult> getGcpVpcPeeringConnection(GetGcpVpcPeeringConnectionArgs args, InvokeOptions options)
fn::invoke:
function: aiven:index/getGcpVpcPeeringConnection:getGcpVpcPeeringConnection
arguments:
# arguments dictionaryThe following arguments are supported:
- Gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- Peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- Vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- Gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- Peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- Vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project StringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- peer
Vpc String - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- vpc
Id String - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp_
project_ strid - Google Cloud project ID. Changing this property forces recreation of the resource.
- peer_
vpc str - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- vpc_
id str - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project StringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- peer
Vpc String - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- vpc
Id String - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
getGcpVpcPeeringConnection Result
The following output properties are available:
- Gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- Self
Link string - Computed Google Cloud network peering link.
- State string
- State of the peering connection.
- State
Info Dictionary<string, string> - State-specific help or error information.
- Vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- Gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- Self
Link string - Computed Google Cloud network peering link.
- State string
- State of the peering connection.
- State
Info map[string]string - State-specific help or error information.
- Vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project StringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- peer
Vpc String - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- self
Link String - Computed Google Cloud network peering link.
- state String
- State of the peering connection.
- state
Info Map<String,String> - State-specific help or error information.
- vpc
Id String - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project stringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- peer
Vpc string - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- self
Link string - Computed Google Cloud network peering link.
- state string
- State of the peering connection.
- state
Info {[key: string]: string} - State-specific help or error information.
- vpc
Id string - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp_
project_ strid - Google Cloud project ID. Changing this property forces recreation of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- peer_
vpc str - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- self_
link str - Computed Google Cloud network peering link.
- state str
- State of the peering connection.
- state_
info Mapping[str, str] - State-specific help or error information.
- vpc_
id str - The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
- gcp
Project StringId - Google Cloud project ID. Changing this property forces recreation of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- peer
Vpc String - Google Cloud VPC network name. Changing this property forces recreation of the resource.
- self
Link String - Computed Google Cloud network peering link.
- state String
- State of the peering connection.
- state
Info Map<String> - State-specific help or error information.
- vpc
Id String - The VPC the peering connection belongs to. 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.
