1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. VpcPeeringConnectionV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.VpcPeeringConnectionV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for VPC peering you can get at documentation portal

    Provides a resource to manage a VPC Peering Connection resource within OpenTelekomCloud.

    Note: For cross-tenant (requester’s tenant differs from the accepter’s tenant) VPC Peering Connections, use the opentelekomcloud.VpcPeeringConnectionV2 resource to manage the requester’s side of the connection and use the opentelekomcloud.VpcPeeringConnectionAccepterV2 resource to manage the accepter’s side of the connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const peering = new opentelekomcloud.VpcPeeringConnectionV2("peering", {
        vpcId: _var.vpc_id,
        peerVpcId: _var.accepter_vpc_id,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    peering = opentelekomcloud.VpcPeeringConnectionV2("peering",
        vpc_id=var["vpc_id"],
        peer_vpc_id=var["accepter_vpc_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.NewVpcPeeringConnectionV2(ctx, "peering", &opentelekomcloud.VpcPeeringConnectionV2Args{
    			VpcId:     pulumi.Any(_var.Vpc_id),
    			PeerVpcId: pulumi.Any(_var.Accepter_vpc_id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var peering = new Opentelekomcloud.VpcPeeringConnectionV2("peering", new()
        {
            VpcId = @var.Vpc_id,
            PeerVpcId = @var.Accepter_vpc_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.VpcPeeringConnectionV2;
    import com.pulumi.opentelekomcloud.VpcPeeringConnectionV2Args;
    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 peering = new VpcPeeringConnectionV2("peering", VpcPeeringConnectionV2Args.builder()
                .vpcId(var_.vpc_id())
                .peerVpcId(var_.accepter_vpc_id())
                .build());
    
        }
    }
    
    resources:
      peering:
        type: opentelekomcloud:VpcPeeringConnectionV2
        properties:
          vpcId: ${var.vpc_id}
          peerVpcId: ${var.accepter_vpc_id}
    

    Create VpcPeeringConnectionV2 Resource

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

    Constructor syntax

    new VpcPeeringConnectionV2(name: string, args: VpcPeeringConnectionV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcPeeringConnectionV2(resource_name: str,
                               args: VpcPeeringConnectionV2Args,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcPeeringConnectionV2(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               peer_vpc_id: Optional[str] = None,
                               vpc_id: Optional[str] = None,
                               name: Optional[str] = None,
                               peer_tenant_id: Optional[str] = None,
                               region: Optional[str] = None,
                               timeouts: Optional[VpcPeeringConnectionV2TimeoutsArgs] = None,
                               vpc_peering_connection_v2_id: Optional[str] = None)
    func NewVpcPeeringConnectionV2(ctx *Context, name string, args VpcPeeringConnectionV2Args, opts ...ResourceOption) (*VpcPeeringConnectionV2, error)
    public VpcPeeringConnectionV2(string name, VpcPeeringConnectionV2Args args, CustomResourceOptions? opts = null)
    public VpcPeeringConnectionV2(String name, VpcPeeringConnectionV2Args args)
    public VpcPeeringConnectionV2(String name, VpcPeeringConnectionV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:VpcPeeringConnectionV2
    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 VpcPeeringConnectionV2Args
    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 VpcPeeringConnectionV2Args
    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 VpcPeeringConnectionV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcPeeringConnectionV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcPeeringConnectionV2Args
    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 vpcPeeringConnectionV2Resource = new Opentelekomcloud.VpcPeeringConnectionV2("vpcPeeringConnectionV2Resource", new()
    {
        PeerVpcId = "string",
        VpcId = "string",
        Name = "string",
        PeerTenantId = "string",
        Region = "string",
        Timeouts = new Opentelekomcloud.Inputs.VpcPeeringConnectionV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        VpcPeeringConnectionV2Id = "string",
    });
    
    example, err := opentelekomcloud.NewVpcPeeringConnectionV2(ctx, "vpcPeeringConnectionV2Resource", &opentelekomcloud.VpcPeeringConnectionV2Args{
    	PeerVpcId:    pulumi.String("string"),
    	VpcId:        pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	PeerTenantId: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	Timeouts: &opentelekomcloud.VpcPeeringConnectionV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	VpcPeeringConnectionV2Id: pulumi.String("string"),
    })
    
    var vpcPeeringConnectionV2Resource = new VpcPeeringConnectionV2("vpcPeeringConnectionV2Resource", VpcPeeringConnectionV2Args.builder()
        .peerVpcId("string")
        .vpcId("string")
        .name("string")
        .peerTenantId("string")
        .region("string")
        .timeouts(VpcPeeringConnectionV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .vpcPeeringConnectionV2Id("string")
        .build());
    
    vpc_peering_connection_v2_resource = opentelekomcloud.VpcPeeringConnectionV2("vpcPeeringConnectionV2Resource",
        peer_vpc_id="string",
        vpc_id="string",
        name="string",
        peer_tenant_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        vpc_peering_connection_v2_id="string")
    
    const vpcPeeringConnectionV2Resource = new opentelekomcloud.VpcPeeringConnectionV2("vpcPeeringConnectionV2Resource", {
        peerVpcId: "string",
        vpcId: "string",
        name: "string",
        peerTenantId: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        vpcPeeringConnectionV2Id: "string",
    });
    
    type: opentelekomcloud:VpcPeeringConnectionV2
    properties:
        name: string
        peerTenantId: string
        peerVpcId: string
        region: string
        timeouts:
            create: string
            delete: string
        vpcId: string
        vpcPeeringConnectionV2Id: string
    

    VpcPeeringConnectionV2 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 VpcPeeringConnectionV2 resource accepts the following input properties:

    PeerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    VpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    Name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    PeerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    Region string
    Timeouts VpcPeeringConnectionV2Timeouts
    VpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    PeerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    VpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    Name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    PeerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    Region string
    Timeouts VpcPeeringConnectionV2TimeoutsArgs
    VpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    peerVpcId String
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    vpcId String
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    name String
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId String
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    region String
    timeouts VpcPeeringConnectionV2Timeouts
    vpcPeeringConnectionV2Id String
    The VPC peering connection ID.
    peerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    vpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    region string
    timeouts VpcPeeringConnectionV2Timeouts
    vpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    peer_vpc_id str
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    vpc_id str
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    name str
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peer_tenant_id str
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    region str
    timeouts VpcPeeringConnectionV2TimeoutsArgs
    vpc_peering_connection_v2_id str
    The VPC peering connection ID.
    peerVpcId String
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    vpcId String
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    name String
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId String
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    region String
    timeouts Property Map
    vpcPeeringConnectionV2Id String
    The VPC peering connection ID.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

    Look up Existing VpcPeeringConnectionV2 Resource

    Get an existing VpcPeeringConnectionV2 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?: VpcPeeringConnectionV2State, opts?: CustomResourceOptions): VpcPeeringConnectionV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            peer_tenant_id: Optional[str] = None,
            peer_vpc_id: Optional[str] = None,
            region: Optional[str] = None,
            status: Optional[str] = None,
            timeouts: Optional[VpcPeeringConnectionV2TimeoutsArgs] = None,
            vpc_id: Optional[str] = None,
            vpc_peering_connection_v2_id: Optional[str] = None) -> VpcPeeringConnectionV2
    func GetVpcPeeringConnectionV2(ctx *Context, name string, id IDInput, state *VpcPeeringConnectionV2State, opts ...ResourceOption) (*VpcPeeringConnectionV2, error)
    public static VpcPeeringConnectionV2 Get(string name, Input<string> id, VpcPeeringConnectionV2State? state, CustomResourceOptions? opts = null)
    public static VpcPeeringConnectionV2 get(String name, Output<String> id, VpcPeeringConnectionV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:VpcPeeringConnectionV2    get:      id: ${id}
    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:
    Name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    PeerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    PeerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    Region string
    Status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    Timeouts VpcPeeringConnectionV2Timeouts
    VpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    VpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    Name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    PeerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    PeerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    Region string
    Status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    Timeouts VpcPeeringConnectionV2TimeoutsArgs
    VpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    VpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    name String
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId String
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    peerVpcId String
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    region String
    status String
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    timeouts VpcPeeringConnectionV2Timeouts
    vpcId String
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    vpcPeeringConnectionV2Id String
    The VPC peering connection ID.
    name string
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId string
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    peerVpcId string
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    region string
    status string
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    timeouts VpcPeeringConnectionV2Timeouts
    vpcId string
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    vpcPeeringConnectionV2Id string
    The VPC peering connection ID.
    name str
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peer_tenant_id str
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    peer_vpc_id str
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    region str
    status str
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    timeouts VpcPeeringConnectionV2TimeoutsArgs
    vpc_id str
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    vpc_peering_connection_v2_id str
    The VPC peering connection ID.
    name String
    Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
    peerTenantId String
    Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
    peerVpcId String
    Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
    region String
    status String
    The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.
    timeouts Property Map
    vpcId String
    Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
    vpcPeeringConnectionV2Id String
    The VPC peering connection ID.

    Supporting Types

    VpcPeeringConnectionV2Timeouts, VpcPeeringConnectionV2TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    VPC Peering resources can be imported using the vpc peering id, e.g.

    $ pulumi import opentelekomcloud:index/vpcPeeringConnectionV2:VpcPeeringConnectionV2 test_connection 22b76469-08e3-4937-8c1d-7aad34892be1
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud