1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. VpcPeerConnectManager
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.VpcPeerConnectManager

Explore with Pulumi AI

Provides a resource to create a vpc peer_connect_manager

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const info = tencentcloud.getUserInfo({});
const ownerUin = info.then(info => info.ownerUin);
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const desVpc = new tencentcloud.Vpc("desVpc", {cidrBlock: "172.16.0.0/16"});
const peerConnectManager = new tencentcloud.VpcPeerConnectManager("peerConnectManager", {
    sourceVpcId: vpc.vpcId,
    peeringConnectionName: "example-iac",
    destinationVpcId: desVpc.vpcId,
    destinationUin: ownerUin,
    destinationRegion: "ap-guangzhou",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

info = tencentcloud.get_user_info()
owner_uin = info.owner_uin
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
des_vpc = tencentcloud.Vpc("desVpc", cidr_block="172.16.0.0/16")
peer_connect_manager = tencentcloud.VpcPeerConnectManager("peerConnectManager",
    source_vpc_id=vpc.vpc_id,
    peering_connection_name="example-iac",
    destination_vpc_id=des_vpc.vpc_id,
    destination_uin=owner_uin,
    destination_region="ap-guangzhou")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		info, err := tencentcloud.GetUserInfo(ctx, &tencentcloud.GetUserInfoArgs{}, nil)
		if err != nil {
			return err
		}
		ownerUin := info.OwnerUin
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		desVpc, err := tencentcloud.NewVpc(ctx, "desVpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewVpcPeerConnectManager(ctx, "peerConnectManager", &tencentcloud.VpcPeerConnectManagerArgs{
			SourceVpcId:           vpc.VpcId,
			PeeringConnectionName: pulumi.String("example-iac"),
			DestinationVpcId:      desVpc.VpcId,
			DestinationUin:        pulumi.String(ownerUin),
			DestinationRegion:     pulumi.String("ap-guangzhou"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var info = Tencentcloud.GetUserInfo.Invoke();

    var ownerUin = info.Apply(getUserInfoResult => getUserInfoResult.OwnerUin);

    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var desVpc = new Tencentcloud.Vpc("desVpc", new()
    {
        CidrBlock = "172.16.0.0/16",
    });

    var peerConnectManager = new Tencentcloud.VpcPeerConnectManager("peerConnectManager", new()
    {
        SourceVpcId = vpc.VpcId,
        PeeringConnectionName = "example-iac",
        DestinationVpcId = desVpc.VpcId,
        DestinationUin = ownerUin,
        DestinationRegion = "ap-guangzhou",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetUserInfoArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.VpcPeerConnectManager;
import com.pulumi.tencentcloud.VpcPeerConnectManagerArgs;
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 info = TencentcloudFunctions.getUserInfo();

        final var ownerUin = info.applyValue(getUserInfoResult -> getUserInfoResult.ownerUin());

        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var desVpc = new Vpc("desVpc", VpcArgs.builder()
            .cidrBlock("172.16.0.0/16")
            .build());

        var peerConnectManager = new VpcPeerConnectManager("peerConnectManager", VpcPeerConnectManagerArgs.builder()
            .sourceVpcId(vpc.vpcId())
            .peeringConnectionName("example-iac")
            .destinationVpcId(desVpc.vpcId())
            .destinationUin(ownerUin)
            .destinationRegion("ap-guangzhou")
            .build());

    }
}
Copy
resources:
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  desVpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 172.16.0.0/16
  peerConnectManager:
    type: tencentcloud:VpcPeerConnectManager
    properties:
      sourceVpcId: ${vpc.vpcId}
      peeringConnectionName: example-iac
      destinationVpcId: ${desVpc.vpcId}
      destinationUin: ${ownerUin}
      destinationRegion: ap-guangzhou
variables:
  info:
    fn::invoke:
      function: tencentcloud:getUserInfo
      arguments: {}
  ownerUin: ${info.ownerUin}
Copy

Create VpcPeerConnectManager Resource

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

Constructor syntax

new VpcPeerConnectManager(name: string, args: VpcPeerConnectManagerArgs, opts?: CustomResourceOptions);
@overload
def VpcPeerConnectManager(resource_name: str,
                          args: VpcPeerConnectManagerArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def VpcPeerConnectManager(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          destination_region: Optional[str] = None,
                          destination_uin: Optional[str] = None,
                          destination_vpc_id: Optional[str] = None,
                          peering_connection_name: Optional[str] = None,
                          source_vpc_id: Optional[str] = None,
                          bandwidth: Optional[float] = None,
                          charge_type: Optional[str] = None,
                          qos_level: Optional[str] = None,
                          type: Optional[str] = None,
                          vpc_peer_connect_manager_id: Optional[str] = None)
func NewVpcPeerConnectManager(ctx *Context, name string, args VpcPeerConnectManagerArgs, opts ...ResourceOption) (*VpcPeerConnectManager, error)
public VpcPeerConnectManager(string name, VpcPeerConnectManagerArgs args, CustomResourceOptions? opts = null)
public VpcPeerConnectManager(String name, VpcPeerConnectManagerArgs args)
public VpcPeerConnectManager(String name, VpcPeerConnectManagerArgs args, CustomResourceOptions options)
type: tencentcloud:VpcPeerConnectManager
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

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

DestinationRegion This property is required. string
Peer region.
DestinationUin This property is required. string
Peer user UIN.
DestinationVpcId This property is required. string
The unique ID of the peer VPC.
PeeringConnectionName This property is required. string
Peer connection name.
SourceVpcId This property is required. string
The unique ID of the local VPC.
Bandwidth double
Bandwidth upper limit, unit Mbps.
ChargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
QosLevel string
Service classification PT, AU, AG.
Type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
VpcPeerConnectManagerId string
ID of the resource.
DestinationRegion This property is required. string
Peer region.
DestinationUin This property is required. string
Peer user UIN.
DestinationVpcId This property is required. string
The unique ID of the peer VPC.
PeeringConnectionName This property is required. string
Peer connection name.
SourceVpcId This property is required. string
The unique ID of the local VPC.
Bandwidth float64
Bandwidth upper limit, unit Mbps.
ChargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
QosLevel string
Service classification PT, AU, AG.
Type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
VpcPeerConnectManagerId string
ID of the resource.
destinationRegion This property is required. String
Peer region.
destinationUin This property is required. String
Peer user UIN.
destinationVpcId This property is required. String
The unique ID of the peer VPC.
peeringConnectionName This property is required. String
Peer connection name.
sourceVpcId This property is required. String
The unique ID of the local VPC.
bandwidth Double
Bandwidth upper limit, unit Mbps.
chargeType String
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
qosLevel String
Service classification PT, AU, AG.
type String
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId String
ID of the resource.
destinationRegion This property is required. string
Peer region.
destinationUin This property is required. string
Peer user UIN.
destinationVpcId This property is required. string
The unique ID of the peer VPC.
peeringConnectionName This property is required. string
Peer connection name.
sourceVpcId This property is required. string
The unique ID of the local VPC.
bandwidth number
Bandwidth upper limit, unit Mbps.
chargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
qosLevel string
Service classification PT, AU, AG.
type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId string
ID of the resource.
destination_region This property is required. str
Peer region.
destination_uin This property is required. str
Peer user UIN.
destination_vpc_id This property is required. str
The unique ID of the peer VPC.
peering_connection_name This property is required. str
Peer connection name.
source_vpc_id This property is required. str
The unique ID of the local VPC.
bandwidth float
Bandwidth upper limit, unit Mbps.
charge_type str
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
qos_level str
Service classification PT, AU, AG.
type str
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpc_peer_connect_manager_id str
ID of the resource.
destinationRegion This property is required. String
Peer region.
destinationUin This property is required. String
Peer user UIN.
destinationVpcId This property is required. String
The unique ID of the peer VPC.
peeringConnectionName This property is required. String
Peer connection name.
sourceVpcId This property is required. String
The unique ID of the local VPC.
bandwidth Number
Bandwidth upper limit, unit Mbps.
chargeType String
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
qosLevel String
Service classification PT, AU, AG.
type String
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId String
ID of the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VpcPeerConnectManager Resource

Get an existing VpcPeerConnectManager 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?: VpcPeerConnectManagerState, opts?: CustomResourceOptions): VpcPeerConnectManager
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bandwidth: Optional[float] = None,
        charge_type: Optional[str] = None,
        destination_region: Optional[str] = None,
        destination_uin: Optional[str] = None,
        destination_vpc_id: Optional[str] = None,
        peering_connection_name: Optional[str] = None,
        qos_level: Optional[str] = None,
        source_vpc_id: Optional[str] = None,
        type: Optional[str] = None,
        vpc_peer_connect_manager_id: Optional[str] = None) -> VpcPeerConnectManager
func GetVpcPeerConnectManager(ctx *Context, name string, id IDInput, state *VpcPeerConnectManagerState, opts ...ResourceOption) (*VpcPeerConnectManager, error)
public static VpcPeerConnectManager Get(string name, Input<string> id, VpcPeerConnectManagerState? state, CustomResourceOptions? opts = null)
public static VpcPeerConnectManager get(String name, Output<String> id, VpcPeerConnectManagerState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:VpcPeerConnectManager    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Bandwidth double
Bandwidth upper limit, unit Mbps.
ChargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
DestinationRegion string
Peer region.
DestinationUin string
Peer user UIN.
DestinationVpcId string
The unique ID of the peer VPC.
PeeringConnectionName string
Peer connection name.
QosLevel string
Service classification PT, AU, AG.
SourceVpcId string
The unique ID of the local VPC.
Type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
VpcPeerConnectManagerId string
ID of the resource.
Bandwidth float64
Bandwidth upper limit, unit Mbps.
ChargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
DestinationRegion string
Peer region.
DestinationUin string
Peer user UIN.
DestinationVpcId string
The unique ID of the peer VPC.
PeeringConnectionName string
Peer connection name.
QosLevel string
Service classification PT, AU, AG.
SourceVpcId string
The unique ID of the local VPC.
Type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
VpcPeerConnectManagerId string
ID of the resource.
bandwidth Double
Bandwidth upper limit, unit Mbps.
chargeType String
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
destinationRegion String
Peer region.
destinationUin String
Peer user UIN.
destinationVpcId String
The unique ID of the peer VPC.
peeringConnectionName String
Peer connection name.
qosLevel String
Service classification PT, AU, AG.
sourceVpcId String
The unique ID of the local VPC.
type String
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId String
ID of the resource.
bandwidth number
Bandwidth upper limit, unit Mbps.
chargeType string
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
destinationRegion string
Peer region.
destinationUin string
Peer user UIN.
destinationVpcId string
The unique ID of the peer VPC.
peeringConnectionName string
Peer connection name.
qosLevel string
Service classification PT, AU, AG.
sourceVpcId string
The unique ID of the local VPC.
type string
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId string
ID of the resource.
bandwidth float
Bandwidth upper limit, unit Mbps.
charge_type str
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
destination_region str
Peer region.
destination_uin str
Peer user UIN.
destination_vpc_id str
The unique ID of the peer VPC.
peering_connection_name str
Peer connection name.
qos_level str
Service classification PT, AU, AG.
source_vpc_id str
The unique ID of the local VPC.
type str
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpc_peer_connect_manager_id str
ID of the resource.
bandwidth Number
Bandwidth upper limit, unit Mbps.
chargeType String
Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
destinationRegion String
Peer region.
destinationUin String
Peer user UIN.
destinationVpcId String
The unique ID of the peer VPC.
peeringConnectionName String
Peer connection name.
qosLevel String
Service classification PT, AU, AG.
sourceVpcId String
The unique ID of the local VPC.
type String
Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
vpcPeerConnectManagerId String
ID of the resource.

Import

vpc peer_connect_manager can be imported using the id, e.g.

$ pulumi import tencentcloud:index/vpcPeerConnectManager:VpcPeerConnectManager peer_connect_manager peer_connect_manager_id
Copy

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

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.