tencentcloud.RouteTable
Explore with Pulumi AI
Provides a resource to create a VPC routing table.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const fooVpc = new tencentcloud.Vpc("fooVpc", {cidrBlock: "10.0.0.0/16"});
const fooRouteTable = new tencentcloud.RouteTable("fooRouteTable", {vpcId: fooVpc.vpcId});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo_vpc = tencentcloud.Vpc("fooVpc", cidr_block="10.0.0.0/16")
foo_route_table = tencentcloud.RouteTable("fooRouteTable", vpc_id=foo_vpc.vpc_id)
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 {
fooVpc, err := tencentcloud.NewVpc(ctx, "fooVpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewRouteTable(ctx, "fooRouteTable", &tencentcloud.RouteTableArgs{
VpcId: fooVpc.VpcId,
})
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 fooVpc = new Tencentcloud.Vpc("fooVpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var fooRouteTable = new Tencentcloud.RouteTable("fooRouteTable", new()
{
VpcId = fooVpc.VpcId,
});
});
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.RouteTable;
import com.pulumi.tencentcloud.RouteTableArgs;
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 fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var fooRouteTable = new RouteTable("fooRouteTable", RouteTableArgs.builder()
.vpcId(fooVpc.vpcId())
.build());
}
}
resources:
fooVpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
fooRouteTable:
type: tencentcloud:RouteTable
properties:
vpcId: ${fooVpc.vpcId}
Create RouteTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteTable(name: string, args: RouteTableArgs, opts?: CustomResourceOptions);
@overload
def RouteTable(resource_name: str,
args: RouteTableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteTable(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_id: Optional[str] = None,
name: Optional[str] = None,
route_table_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewRouteTable(ctx *Context, name string, args RouteTableArgs, opts ...ResourceOption) (*RouteTable, error)
public RouteTable(string name, RouteTableArgs args, CustomResourceOptions? opts = null)
public RouteTable(String name, RouteTableArgs args)
public RouteTable(String name, RouteTableArgs args, CustomResourceOptions options)
type: tencentcloud:RouteTable
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 RouteTableArgs
- 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 RouteTableArgs
- 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 RouteTableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteTableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RouteTable 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 RouteTable resource accepts the following input properties:
- Vpc
Id string - ID of VPC to which the route table should be associated.
- Name string
- The name of routing table.
- Route
Table stringId - ID of the resource.
- Dictionary<string, string>
- The tags of routing table.
- Vpc
Id string - ID of VPC to which the route table should be associated.
- Name string
- The name of routing table.
- Route
Table stringId - ID of the resource.
- map[string]string
- The tags of routing table.
- vpc
Id String - ID of VPC to which the route table should be associated.
- name String
- The name of routing table.
- route
Table StringId - ID of the resource.
- Map<String,String>
- The tags of routing table.
- vpc
Id string - ID of VPC to which the route table should be associated.
- name string
- The name of routing table.
- route
Table stringId - ID of the resource.
- {[key: string]: string}
- The tags of routing table.
- vpc_
id str - ID of VPC to which the route table should be associated.
- name str
- The name of routing table.
- route_
table_ strid - ID of the resource.
- Mapping[str, str]
- The tags of routing table.
- vpc
Id String - ID of VPC to which the route table should be associated.
- name String
- The name of routing table.
- route
Table StringId - ID of the resource.
- Map<String>
- The tags of routing table.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteTable resource produces the following output properties:
- Create
Time string - Creation time of the routing table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Indicates whether it is the default routing table.
- Route
Entry List<string>Ids - ID list of the routing entries.
- Subnet
Ids List<string> - ID list of the subnets associated with this route table.
- Create
Time string - Creation time of the routing table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Indicates whether it is the default routing table.
- Route
Entry []stringIds - ID list of the routing entries.
- Subnet
Ids []string - ID list of the subnets associated with this route table.
- create
Time String - Creation time of the routing table.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Indicates whether it is the default routing table.
- route
Entry List<String>Ids - ID list of the routing entries.
- subnet
Ids List<String> - ID list of the subnets associated with this route table.
- create
Time string - Creation time of the routing table.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - Indicates whether it is the default routing table.
- route
Entry string[]Ids - ID list of the routing entries.
- subnet
Ids string[] - ID list of the subnets associated with this route table.
- create_
time str - Creation time of the routing table.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Indicates whether it is the default routing table.
- route_
entry_ Sequence[str]ids - ID list of the routing entries.
- subnet_
ids Sequence[str] - ID list of the subnets associated with this route table.
- create
Time String - Creation time of the routing table.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Indicates whether it is the default routing table.
- route
Entry List<String>Ids - ID list of the routing entries.
- subnet
Ids List<String> - ID list of the subnets associated with this route table.
Look up Existing RouteTable Resource
Get an existing RouteTable 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?: RouteTableState, opts?: CustomResourceOptions): RouteTable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None,
route_entry_ids: Optional[Sequence[str]] = None,
route_table_id: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None) -> RouteTable
func GetRouteTable(ctx *Context, name string, id IDInput, state *RouteTableState, opts ...ResourceOption) (*RouteTable, error)
public static RouteTable Get(string name, Input<string> id, RouteTableState? state, CustomResourceOptions? opts = null)
public static RouteTable get(String name, Output<String> id, RouteTableState state, CustomResourceOptions options)
resources: _: type: tencentcloud:RouteTable 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.
- Create
Time string - Creation time of the routing table.
- Is
Default bool - Indicates whether it is the default routing table.
- Name string
- The name of routing table.
- Route
Entry List<string>Ids - ID list of the routing entries.
- Route
Table stringId - ID of the resource.
- Subnet
Ids List<string> - ID list of the subnets associated with this route table.
- Dictionary<string, string>
- The tags of routing table.
- Vpc
Id string - ID of VPC to which the route table should be associated.
- Create
Time string - Creation time of the routing table.
- Is
Default bool - Indicates whether it is the default routing table.
- Name string
- The name of routing table.
- Route
Entry []stringIds - ID list of the routing entries.
- Route
Table stringId - ID of the resource.
- Subnet
Ids []string - ID list of the subnets associated with this route table.
- map[string]string
- The tags of routing table.
- Vpc
Id string - ID of VPC to which the route table should be associated.
- create
Time String - Creation time of the routing table.
- is
Default Boolean - Indicates whether it is the default routing table.
- name String
- The name of routing table.
- route
Entry List<String>Ids - ID list of the routing entries.
- route
Table StringId - ID of the resource.
- subnet
Ids List<String> - ID list of the subnets associated with this route table.
- Map<String,String>
- The tags of routing table.
- vpc
Id String - ID of VPC to which the route table should be associated.
- create
Time string - Creation time of the routing table.
- is
Default boolean - Indicates whether it is the default routing table.
- name string
- The name of routing table.
- route
Entry string[]Ids - ID list of the routing entries.
- route
Table stringId - ID of the resource.
- subnet
Ids string[] - ID list of the subnets associated with this route table.
- {[key: string]: string}
- The tags of routing table.
- vpc
Id string - ID of VPC to which the route table should be associated.
- create_
time str - Creation time of the routing table.
- is_
default bool - Indicates whether it is the default routing table.
- name str
- The name of routing table.
- route_
entry_ Sequence[str]ids - ID list of the routing entries.
- route_
table_ strid - ID of the resource.
- subnet_
ids Sequence[str] - ID list of the subnets associated with this route table.
- Mapping[str, str]
- The tags of routing table.
- vpc_
id str - ID of VPC to which the route table should be associated.
- create
Time String - Creation time of the routing table.
- is
Default Boolean - Indicates whether it is the default routing table.
- name String
- The name of routing table.
- route
Entry List<String>Ids - ID list of the routing entries.
- route
Table StringId - ID of the resource.
- subnet
Ids List<String> - ID list of the subnets associated with this route table.
- Map<String>
- The tags of routing table.
- vpc
Id String - ID of VPC to which the route table should be associated.
Import
Vpc routetable instance can be imported, e.g.
$ pulumi import tencentcloud:index/routeTable:RouteTable test route_table_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.