1. Packages
  2. Aiven Provider
  3. API Docs
  4. GcpVpcPeeringConnection
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

aiven.GcpVpcPeeringConnection

Explore with Pulumi AI

aiven logo
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

    Creates and manages a Google Cloud VPC peering connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const foo = new aiven.GcpVpcPeeringConnection("foo", {
        vpcId: vpc.id,
        gcpProjectId: "xxxx",
        peerVpc: "xxxx",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    foo = aiven.GcpVpcPeeringConnection("foo",
        vpc_id=vpc["id"],
        gcp_project_id="xxxx",
        peer_vpc="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(vpc.Id),
    			GcpProjectId: pulumi.String("xxxx"),
    			PeerVpc:      pulumi.String("xxxx"),
    		})
    		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 foo = new Aiven.GcpVpcPeeringConnection("foo", new()
        {
            VpcId = vpc.Id,
            GcpProjectId = "xxxx",
            PeerVpc = "xxxx",
        });
    
    });
    
    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(vpc.id())
                .gcpProjectId("xxxx")
                .peerVpc("xxxx")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: aiven:GcpVpcPeeringConnection
        properties:
          vpcId: ${vpc.id}
          gcpProjectId: xxxx
          peerVpc: xxxx
    

    Create GcpVpcPeeringConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GcpVpcPeeringConnection(name: string, args: GcpVpcPeeringConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def GcpVpcPeeringConnection(resource_name: str,
                                args: GcpVpcPeeringConnectionArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gcpVpcPeeringConnectionResource = new Aiven.GcpVpcPeeringConnection("gcpVpcPeeringConnectionResource", new()
    {
        GcpProjectId = "string",
        PeerVpc = "string",
        VpcId = "string",
    });
    
    example, err := aiven.NewGcpVpcPeeringConnection(ctx, "gcpVpcPeeringConnectionResource", &aiven.GcpVpcPeeringConnectionArgs{
    	GcpProjectId: pulumi.String("string"),
    	PeerVpc:      pulumi.String("string"),
    	VpcId:        pulumi.String("string"),
    })
    
    var gcpVpcPeeringConnectionResource = new GcpVpcPeeringConnection("gcpVpcPeeringConnectionResource", GcpVpcPeeringConnectionArgs.builder()
        .gcpProjectId("string")
        .peerVpc("string")
        .vpcId("string")
        .build());
    
    gcp_vpc_peering_connection_resource = aiven.GcpVpcPeeringConnection("gcpVpcPeeringConnectionResource",
        gcp_project_id="string",
        peer_vpc="string",
        vpc_id="string")
    
    const gcpVpcPeeringConnectionResource = new aiven.GcpVpcPeeringConnection("gcpVpcPeeringConnectionResource", {
        gcpProjectId: "string",
        peerVpc: "string",
        vpcId: "string",
    });
    
    type: aiven:GcpVpcPeeringConnection
    properties:
        gcpProjectId: string
        peerVpc: string
        vpcId: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GcpVpcPeeringConnection resource accepts the following input properties:

    GcpProjectId string
    Google Cloud project ID. Changing this property forces recreation of the resource.
    PeerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    GcpProjectId string
    Google Cloud project ID. Changing this property forces recreation of the resource.
    PeerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcpProjectId String
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc String
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcpProjectId string
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    vpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcp_project_id str
    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.
    gcpProjectId String
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc String
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. Changing this property 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.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection.
    StateInfo Dictionary<string, string>
    State-specific help or error information.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection.
    StateInfo map[string]string
    State-specific help or error information.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection.
    stateInfo Map<String,String>
    State-specific help or error information.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    Computed Google Cloud network peering link.
    state string
    State of the peering connection.
    stateInfo {[key: string]: string}
    State-specific help or error information.
    id str
    The provider-assigned unique ID for this managed 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.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection.
    stateInfo Map<String>
    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, str]] = 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
    Google Cloud project ID. Changing this property forces recreation of the resource.
    PeerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection.
    StateInfo Dictionary<string, string>
    State-specific help or error information.
    VpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    GcpProjectId string
    Google Cloud project ID. Changing this property forces recreation of the resource.
    PeerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    SelfLink string
    Computed Google Cloud network peering link.
    State string
    State of the peering connection.
    StateInfo map[string]string
    State-specific help or error information.
    VpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcpProjectId String
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc String
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection.
    stateInfo Map<String,String>
    State-specific help or error information.
    vpcId String
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcpProjectId string
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc string
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    selfLink string
    Computed Google Cloud network peering link.
    state string
    State of the peering connection.
    stateInfo {[key: string]: string}
    State-specific help or error information.
    vpcId string
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.
    gcp_project_id str
    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.
    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.
    gcpProjectId String
    Google Cloud project ID. Changing this property forces recreation of the resource.
    peerVpc String
    Google Cloud VPC network name. Changing this property forces recreation of the resource.
    selfLink String
    Computed Google Cloud network peering link.
    state String
    State of the peering connection.
    stateInfo Map<String>
    State-specific help or error information.
    vpcId String
    The VPC the peering connection belongs to. Changing this property forces recreation of the resource.

    Import

    $ pulumi import aiven:index/gcpVpcPeeringConnection:GcpVpcPeeringConnection foo PROJECT_NAME/VPC_ID/GCP_PROJECT_ID/PEER_VPC
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.28.0 published on Friday, Nov 15, 2024 by Pulumi