aiven.GcpVpcPeeringConnection
Explore with Pulumi AI
The GCP VPC Peering Connection resource allows the creation and management of Aiven GCP VPC Peering Connections.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var foo = new Aiven.GcpVpcPeeringConnection("foo", 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.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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.GcpVpcPeeringConnection;
import com.pulumi.aiven.GcpVpcPeeringConnectionArgs;
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) {
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 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:
- Gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- Peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- Vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- Gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- Peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- Vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp
Project StringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc String GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- vpc
Id String The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp_
project_ strid 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.
- gcp
Project StringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc String GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- vpc
Id 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 str
The provider-assigned unique ID for this managed 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
Look up 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,
self_link: 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.
- Gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- Peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- Self
Link string Computed GCP network peering link
- State string
State of the peering connection
- State
Info Dictionary<string, object> State-specific help or error information
- Vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- Gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- Peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- Self
Link string Computed GCP network peering link
- State string
State of the peering connection
- State
Info map[string]interface{} State-specific help or error information
- Vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp
Project StringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc String GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- self
Link String Computed GCP network peering link
- state String
State of the peering connection
- state
Info Map<String,Object> State-specific help or error information
- vpc
Id String The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp
Project stringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc string GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- self
Link string Computed GCP network peering link
- state string
State of the peering connection
- state
Info {[key: string]: any} State-specific help or error information
- vpc
Id string The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
- gcp_
project_ strid 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.
- 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.
- gcp
Project StringId GCP project ID. This property cannot be changed, doing so forces recreation of the resource.
- peer
Vpc String GCP VPC network name. This property cannot be changed, doing so forces recreation of the resource.
- self
Link String Computed GCP network peering link
- state String
State of the peering connection
- state
Info Map<Any> State-specific help or error information
- vpc
Id 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
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aiven
Terraform Provider.