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",
});
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")
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
})
}
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",
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args VpcPeerConnectManagerArgs
- 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 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 string
- The unique name of the resource.
- args VpcPeerConnectManagerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcPeerConnectManagerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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:
- Destination
Region string - Peer region.
- Destination
Uin string - Peer user UIN.
- Destination
Vpc stringId - The unique ID of the peer VPC.
- Peering
Connection stringName - Peer connection name.
- Source
Vpc stringId - The unique ID of the local VPC.
- Bandwidth double
- Bandwidth upper limit, unit Mbps.
- Charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- Qos
Level string - Service classification PT, AU, AG.
- Type string
- Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
- Vpc
Peer stringConnect Manager Id - ID of the resource.
- Destination
Region string - Peer region.
- Destination
Uin string - Peer user UIN.
- Destination
Vpc stringId - The unique ID of the peer VPC.
- Peering
Connection stringName - Peer connection name.
- Source
Vpc stringId - The unique ID of the local VPC.
- Bandwidth float64
- Bandwidth upper limit, unit Mbps.
- Charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- Qos
Level string - Service classification PT, AU, AG.
- Type string
- Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
- Vpc
Peer stringConnect Manager Id - ID of the resource.
- destination
Region String - Peer region.
- destination
Uin String - Peer user UIN.
- destination
Vpc StringId - The unique ID of the peer VPC.
- peering
Connection StringName - Peer connection name.
- source
Vpc StringId - The unique ID of the local VPC.
- bandwidth Double
- Bandwidth upper limit, unit Mbps.
- charge
Type String - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- qos
Level String - Service classification PT, AU, AG.
- type String
- Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
- vpc
Peer StringConnect Manager Id - ID of the resource.
- destination
Region string - Peer region.
- destination
Uin string - Peer user UIN.
- destination
Vpc stringId - The unique ID of the peer VPC.
- peering
Connection stringName - Peer connection name.
- source
Vpc stringId - The unique ID of the local VPC.
- bandwidth number
- Bandwidth upper limit, unit Mbps.
- charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- qos
Level string - Service classification PT, AU, AG.
- type string
- Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
- vpc
Peer stringConnect Manager Id - ID of the resource.
- destination_
region str - Peer region.
- destination_
uin str - Peer user UIN.
- destination_
vpc_ strid - The unique ID of the peer VPC.
- peering_
connection_ strname - Peer connection name.
- source_
vpc_ strid - 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_ strconnect_ manager_ id - ID of the resource.
- destination
Region String - Peer region.
- destination
Uin String - Peer user UIN.
- destination
Vpc StringId - The unique ID of the peer VPC.
- peering
Connection StringName - Peer connection name.
- source
Vpc StringId - The unique ID of the local VPC.
- bandwidth Number
- Bandwidth upper limit, unit Mbps.
- charge
Type String - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- qos
Level String - Service classification PT, AU, AG.
- type String
- Interworking type, VPC_PEER interworking between VPCs; VPC_BM_PEER interworking between VPC and BM Network.
- vpc
Peer StringConnect Manager Id - 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
- 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.
- Bandwidth double
- Bandwidth upper limit, unit Mbps.
- Charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- Destination
Region string - Peer region.
- Destination
Uin string - Peer user UIN.
- Destination
Vpc stringId - The unique ID of the peer VPC.
- Peering
Connection stringName - Peer connection name.
- Qos
Level string - Service classification PT, AU, AG.
- Source
Vpc stringId - 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.
- Vpc
Peer stringConnect Manager Id - ID of the resource.
- Bandwidth float64
- Bandwidth upper limit, unit Mbps.
- Charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- Destination
Region string - Peer region.
- Destination
Uin string - Peer user UIN.
- Destination
Vpc stringId - The unique ID of the peer VPC.
- Peering
Connection stringName - Peer connection name.
- Qos
Level string - Service classification PT, AU, AG.
- Source
Vpc stringId - 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.
- Vpc
Peer stringConnect Manager Id - ID of the resource.
- bandwidth Double
- Bandwidth upper limit, unit Mbps.
- charge
Type String - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- destination
Region String - Peer region.
- destination
Uin String - Peer user UIN.
- destination
Vpc StringId - The unique ID of the peer VPC.
- peering
Connection StringName - Peer connection name.
- qos
Level String - Service classification PT, AU, AG.
- source
Vpc StringId - 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.
- vpc
Peer StringConnect Manager Id - ID of the resource.
- bandwidth number
- Bandwidth upper limit, unit Mbps.
- charge
Type string - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- destination
Region string - Peer region.
- destination
Uin string - Peer user UIN.
- destination
Vpc stringId - The unique ID of the peer VPC.
- peering
Connection stringName - Peer connection name.
- qos
Level string - Service classification PT, AU, AG.
- source
Vpc stringId - 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.
- vpc
Peer stringConnect Manager Id - 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_ strid - The unique ID of the peer VPC.
- peering_
connection_ strname - Peer connection name.
- qos_
level str - Service classification PT, AU, AG.
- source_
vpc_ strid - 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_ strconnect_ manager_ id - ID of the resource.
- bandwidth Number
- Bandwidth upper limit, unit Mbps.
- charge
Type String - Billing mode, daily peak value POSTPAID_BY_DAY_MAX, monthly value 95 POSTPAID_BY_MONTH_95.
- destination
Region String - Peer region.
- destination
Uin String - Peer user UIN.
- destination
Vpc StringId - The unique ID of the peer VPC.
- peering
Connection StringName - Peer connection name.
- qos
Level String - Service classification PT, AU, AG.
- source
Vpc StringId - 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.
- vpc
Peer StringConnect Manager Id - 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
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.