tencentcloud.CcnRouteTable
Explore with Pulumi AI
Provides a resource to create a CCN Route table.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const region = config.get("region") || "ap-guangzhou";
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "172.16.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: availabilityZone,
vpcId: vpc.vpcId,
cidrBlock: "10.0.20.0/28",
isMulticast: false,
});
// create ccn
const exampleCcn = new tencentcloud.Ccn("exampleCcn", {
description: "desc.",
qos: "AG",
chargeType: "PREPAID",
bandwidthLimitType: "INTER_REGION_LIMIT",
tags: {
createBy: "terraform",
},
});
// create ccn route table
const exampleCcnRouteTable = new tencentcloud.CcnRouteTable("exampleCcnRouteTable", {
ccnId: exampleCcn.ccnId,
description: "desc.",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "ap-guangzhou"
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="172.16.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
availability_zone=availability_zone,
vpc_id=vpc.vpc_id,
cidr_block="10.0.20.0/28",
is_multicast=False)
# create ccn
example_ccn = tencentcloud.Ccn("exampleCcn",
description="desc.",
qos="AG",
charge_type="PREPAID",
bandwidth_limit_type="INTER_REGION_LIMIT",
tags={
"createBy": "terraform",
})
# create ccn route table
example_ccn_route_table = tencentcloud.CcnRouteTable("exampleCcnRouteTable",
ccn_id=example_ccn.ccn_id,
description="desc.")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
region := "ap-guangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
// create subnet
_, err = tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(availabilityZone),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.20.0/28"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create ccn
exampleCcn, err := tencentcloud.NewCcn(ctx, "exampleCcn", &tencentcloud.CcnArgs{
Description: pulumi.String("desc."),
Qos: pulumi.String("AG"),
ChargeType: pulumi.String("PREPAID"),
BandwidthLimitType: pulumi.String("INTER_REGION_LIMIT"),
Tags: pulumi.StringMap{
"createBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
// create ccn route table
_, err = tencentcloud.NewCcnRouteTable(ctx, "exampleCcnRouteTable", &tencentcloud.CcnRouteTableArgs{
CcnId: exampleCcn.CcnId,
Description: pulumi.String("desc."),
})
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 config = new Config();
var region = config.Get("region") ?? "ap-guangzhou";
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "172.16.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = availabilityZone,
VpcId = vpc.VpcId,
CidrBlock = "10.0.20.0/28",
IsMulticast = false,
});
// create ccn
var exampleCcn = new Tencentcloud.Ccn("exampleCcn", new()
{
Description = "desc.",
Qos = "AG",
ChargeType = "PREPAID",
BandwidthLimitType = "INTER_REGION_LIMIT",
Tags =
{
{ "createBy", "terraform" },
},
});
// create ccn route table
var exampleCcnRouteTable = new Tencentcloud.CcnRouteTable("exampleCcnRouteTable", new()
{
CcnId = exampleCcn.CcnId,
Description = "desc.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Ccn;
import com.pulumi.tencentcloud.CcnArgs;
import com.pulumi.tencentcloud.CcnRouteTable;
import com.pulumi.tencentcloud.CcnRouteTableArgs;
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 config = ctx.config();
final var region = config.get("region").orElse("ap-guangzhou");
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("172.16.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(availabilityZone)
.vpcId(vpc.vpcId())
.cidrBlock("10.0.20.0/28")
.isMulticast(false)
.build());
// create ccn
var exampleCcn = new Ccn("exampleCcn", CcnArgs.builder()
.description("desc.")
.qos("AG")
.chargeType("PREPAID")
.bandwidthLimitType("INTER_REGION_LIMIT")
.tags(Map.of("createBy", "terraform"))
.build());
// create ccn route table
var exampleCcnRouteTable = new CcnRouteTable("exampleCcnRouteTable", CcnRouteTableArgs.builder()
.ccnId(exampleCcn.ccnId())
.description("desc.")
.build());
}
}
configuration:
region:
type: string
default: ap-guangzhou
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 172.16.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${availabilityZone}
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.20.0/28
isMulticast: false
# create ccn
exampleCcn:
type: tencentcloud:Ccn
properties:
description: desc.
qos: AG
chargeType: PREPAID
bandwidthLimitType: INTER_REGION_LIMIT
tags:
createBy: terraform
# create ccn route table
exampleCcnRouteTable:
type: tencentcloud:CcnRouteTable
properties:
ccnId: ${exampleCcn.ccnId}
description: desc.
Create CcnRouteTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CcnRouteTable(name: string, args: CcnRouteTableArgs, opts?: CustomResourceOptions);
@overload
def CcnRouteTable(resource_name: str,
args: CcnRouteTableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CcnRouteTable(resource_name: str,
opts: Optional[ResourceOptions] = None,
ccn_id: Optional[str] = None,
description: Optional[str] = None,
ccn_route_table_id: Optional[str] = None,
name: Optional[str] = None)
func NewCcnRouteTable(ctx *Context, name string, args CcnRouteTableArgs, opts ...ResourceOption) (*CcnRouteTable, error)
public CcnRouteTable(string name, CcnRouteTableArgs args, CustomResourceOptions? opts = null)
public CcnRouteTable(String name, CcnRouteTableArgs args)
public CcnRouteTable(String name, CcnRouteTableArgs args, CustomResourceOptions options)
type: tencentcloud:CcnRouteTable
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 CcnRouteTableArgs
- 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 CcnRouteTableArgs
- 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 CcnRouteTableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CcnRouteTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CcnRouteTableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CcnRouteTable 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 CcnRouteTable resource accepts the following input properties:
- Ccn
Id string - CCN Instance ID.
- Description string
- Description of CCN Route table.
- Ccn
Route stringTable Id - ID of the resource.
- Name string
- CCN Route table name.
- Ccn
Id string - CCN Instance ID.
- Description string
- Description of CCN Route table.
- Ccn
Route stringTable Id - ID of the resource.
- Name string
- CCN Route table name.
- ccn
Id String - CCN Instance ID.
- description String
- Description of CCN Route table.
- ccn
Route StringTable Id - ID of the resource.
- name String
- CCN Route table name.
- ccn
Id string - CCN Instance ID.
- description string
- Description of CCN Route table.
- ccn
Route stringTable Id - ID of the resource.
- name string
- CCN Route table name.
- ccn_
id str - CCN Instance ID.
- description str
- Description of CCN Route table.
- ccn_
route_ strtable_ id - ID of the resource.
- name str
- CCN Route table name.
- ccn
Id String - CCN Instance ID.
- description String
- Description of CCN Route table.
- ccn
Route StringTable Id - ID of the resource.
- name String
- CCN Route table name.
Outputs
All input properties are implicitly available as output properties. Additionally, the CcnRouteTable resource produces the following output properties:
- Create
Time string - create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default boolTable - True: default routing table False: non default routing table.
- Create
Time string - create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default boolTable - True: default routing table False: non default routing table.
- create
Time String - create time.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default BooleanTable - True: default routing table False: non default routing table.
- create
Time string - create time.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default booleanTable - True: default routing table False: non default routing table.
- create_
time str - create time.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default_ booltable - True: default routing table False: non default routing table.
- create
Time String - create time.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default BooleanTable - True: default routing table False: non default routing table.
Look up Existing CcnRouteTable Resource
Get an existing CcnRouteTable 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?: CcnRouteTableState, opts?: CustomResourceOptions): CcnRouteTable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ccn_id: Optional[str] = None,
ccn_route_table_id: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
is_default_table: Optional[bool] = None,
name: Optional[str] = None) -> CcnRouteTable
func GetCcnRouteTable(ctx *Context, name string, id IDInput, state *CcnRouteTableState, opts ...ResourceOption) (*CcnRouteTable, error)
public static CcnRouteTable Get(string name, Input<string> id, CcnRouteTableState? state, CustomResourceOptions? opts = null)
public static CcnRouteTable get(String name, Output<String> id, CcnRouteTableState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CcnRouteTable 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.
- Ccn
Id string - CCN Instance ID.
- Ccn
Route stringTable Id - ID of the resource.
- Create
Time string - create time.
- Description string
- Description of CCN Route table.
- Is
Default boolTable - True: default routing table False: non default routing table.
- Name string
- CCN Route table name.
- Ccn
Id string - CCN Instance ID.
- Ccn
Route stringTable Id - ID of the resource.
- Create
Time string - create time.
- Description string
- Description of CCN Route table.
- Is
Default boolTable - True: default routing table False: non default routing table.
- Name string
- CCN Route table name.
- ccn
Id String - CCN Instance ID.
- ccn
Route StringTable Id - ID of the resource.
- create
Time String - create time.
- description String
- Description of CCN Route table.
- is
Default BooleanTable - True: default routing table False: non default routing table.
- name String
- CCN Route table name.
- ccn
Id string - CCN Instance ID.
- ccn
Route stringTable Id - ID of the resource.
- create
Time string - create time.
- description string
- Description of CCN Route table.
- is
Default booleanTable - True: default routing table False: non default routing table.
- name string
- CCN Route table name.
- ccn_
id str - CCN Instance ID.
- ccn_
route_ strtable_ id - ID of the resource.
- create_
time str - create time.
- description str
- Description of CCN Route table.
- is_
default_ booltable - True: default routing table False: non default routing table.
- name str
- CCN Route table name.
- ccn
Id String - CCN Instance ID.
- ccn
Route StringTable Id - ID of the resource.
- create
Time String - create time.
- description String
- Description of CCN Route table.
- is
Default BooleanTable - True: default routing table False: non default routing table.
- name String
- CCN Route table name.
Import
Ccn instance can be imported, e.g.
$ pulumi import tencentcloud:index/ccnRouteTable:CcnRouteTable example ccnrtb-r5hrr417
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.