Aiven

Pulumi Official
Package maintained by Pulumi
v5.2.0 published on Wednesday, Jul 20, 2022 by Pulumi

GcpVpcPeeringConnection

The GCP VPC Peering Connection resource allows the creation and management of Aiven GCP VPC Peering Connections.

Example Usage

using Pulumi;
using Aiven = Pulumi.Aiven;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Aiven.GcpVpcPeeringConnection("foo", new Aiven.GcpVpcPeeringConnectionArgs
        {
            VpcId = data.Aiven_project_vpc.Vpc.Id,
            GcpProjectId = "xxxx",
            PeerVpc = "xxxx",
        });
    }

}
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.NewGcpVpcPeeringConnection(ctx, "foo", &aiven.GcpVpcPeeringConnectionArgs{
			VpcId:        pulumi.Any(data.Aiven_project_vpc.Vpc.Id),
			GcpProjectId: pulumi.String("xxxx"),
			PeerVpc:      pulumi.String("xxxx"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var foo = new GcpVpcPeeringConnection("foo", GcpVpcPeeringConnectionArgs.builder()        
            .vpcId(data.aiven_project_vpc().vpc().id())
            .gcpProjectId("xxxx")
            .peerVpc("xxxx")
            .build());

    }
}
import pulumi
import pulumi_aiven as aiven

foo = aiven.GcpVpcPeeringConnection("foo",
    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 = new aiven.GcpVpcPeeringConnection("foo", {
    vpcId: data.aiven_project_vpc.vpc.id,
    gcpProjectId: "xxxx",
    peerVpc: "xxxx",
});
resources:
  foo:
    type: aiven:GcpVpcPeeringConnection
    properties:
      vpcId: ${data.aiven_project_vpc.vpc.id}
      gcpProjectId: xxxx
      peerVpc: xxxx

Create a GcpVpcPeeringConnection Resource

new GcpVpcPeeringConnection(name: string, args: GcpVpcPeeringConnectionArgs, opts?: CustomResourceOptions);
@overload
def GcpVpcPeeringConnection(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            gcp_project_id: Optional[str] = None,
                            peer_vpc: Optional[str] = None,
                            vpc_id: Optional[str] = None)
@overload
def GcpVpcPeeringConnection(resource_name: str,
                            args: GcpVpcPeeringConnectionArgs,
                            opts: Optional[ResourceOptions] = None)
func NewGcpVpcPeeringConnection(ctx *Context, name string, args GcpVpcPeeringConnectionArgs, opts ...ResourceOption) (*GcpVpcPeeringConnection, error)
public GcpVpcPeeringConnection(string name, GcpVpcPeeringConnectionArgs args, CustomResourceOptions? opts = null)
public GcpVpcPeeringConnection(String name, GcpVpcPeeringConnectionArgs args)
public GcpVpcPeeringConnection(String name, GcpVpcPeeringConnectionArgs args, CustomResourceOptions options)
type: aiven:GcpVpcPeeringConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args GcpVpcPeeringConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args GcpVpcPeeringConnectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GcpVpcPeeringConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GcpVpcPeeringConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args GcpVpcPeeringConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

GcpVpcPeeringConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The GcpVpcPeeringConnection resource accepts the following input properties:

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the GcpVpcPeeringConnection resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

State string

State of the peering connection

StateInfo Dictionary<string, object>

State-specific help or error information

Id string

The provider-assigned unique ID for this managed resource.

State string

State of the peering connection

StateInfo map[string]interface{}

State-specific help or error information

id String

The provider-assigned unique ID for this managed resource.

state String

State of the peering connection

stateInfo Map<String,Object>

State-specific help or error information

id string

The provider-assigned unique ID for this managed resource.

state string

State of the peering connection

stateInfo {[key: string]: any}

State-specific help or error information

id str

The provider-assigned unique ID for this managed resource.

state str

State of the peering connection

state_info Mapping[str, Any]

State-specific help or error information

id String

The provider-assigned unique ID for this managed resource.

state String

State of the peering connection

stateInfo Map<Any>

State-specific help or error information

Look up an Existing GcpVpcPeeringConnection Resource

Get an existing GcpVpcPeeringConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GcpVpcPeeringConnectionState, opts?: CustomResourceOptions): GcpVpcPeeringConnection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        gcp_project_id: Optional[str] = None,
        peer_vpc: Optional[str] = None,
        state: Optional[str] = None,
        state_info: Optional[Mapping[str, Any]] = None,
        vpc_id: Optional[str] = None) -> GcpVpcPeeringConnection
func GetGcpVpcPeeringConnection(ctx *Context, name string, id IDInput, state *GcpVpcPeeringConnectionState, opts ...ResourceOption) (*GcpVpcPeeringConnection, error)
public static GcpVpcPeeringConnection Get(string name, Input<string> id, GcpVpcPeeringConnectionState? state, CustomResourceOptions? opts = null)
public static GcpVpcPeeringConnection get(String name, Output<String> id, GcpVpcPeeringConnectionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state 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.

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.

PeerVpc string

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

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.

peerVpc String

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

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.

peerVpc string

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

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.

peer_vpc str

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

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.

peerVpc String

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

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.

Import

 $ pulumi import aiven:index/gcpVpcPeeringConnection:GcpVpcPeeringConnection foo project_name/vpc_id/gcp_project_id/peer_vpc

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes

This Pulumi package is based on the aiven Terraform Provider.