RouteTableArgs

data class RouteTableArgs(val associateType: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val routePropagationEnable: Output<Boolean>? = null, val routeTableName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<RouteTableArgs>

Provides a VPC Route Table resource. Currently, customized route tables are available in most regions apart from China (Beijing), China (Hangzhou), and China (Shenzhen) regions. For information about VPC Route Table and how to use it, see What is Route Table.

NOTE: Available since v1.0.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultVpc = new alicloud.vpc.Network("defaultVpc", {vpcName: name});
const _default = new alicloud.vpc.RouteTable("default", {
description: "test-description",
vpcId: defaultVpc.id,
routeTableName: name,
associateType: "VSwitch",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_vpc = alicloud.vpc.Network("defaultVpc", vpc_name=name)
default = alicloud.vpc.RouteTable("default",
description="test-description",
vpc_id=default_vpc.id,
route_table_name=name,
associate_type="VSwitch")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultVpc = new AliCloud.Vpc.Network("defaultVpc", new()
{
VpcName = name,
});
var @default = new AliCloud.Vpc.RouteTable("default", new()
{
Description = "test-description",
VpcId = defaultVpc.Id,
RouteTableName = name,
AssociateType = "VSwitch",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"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, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultVpc, err := vpc.NewNetwork(ctx, "defaultVpc", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = vpc.NewRouteTable(ctx, "default", &vpc.RouteTableArgs{
Description: pulumi.String("test-description"),
VpcId: defaultVpc.ID(),
RouteTableName: pulumi.String(name),
AssociateType: pulumi.String("VSwitch"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.RouteTable;
import com.pulumi.alicloud.vpc.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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaultVpc = new Network("defaultVpc", NetworkArgs.builder()
.vpcName(name)
.build());
var default_ = new RouteTable("default", RouteTableArgs.builder()
.description("test-description")
.vpcId(defaultVpc.id())
.routeTableName(name)
.associateType("VSwitch")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultVpc:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
default:
type: alicloud:vpc:RouteTable
properties:
description: test-description
vpcId: ${defaultVpc.id}
routeTableName: ${name}
associateType: VSwitch

Import

VPC Route Table can be imported using the id, e.g.

$ pulumi import alicloud:vpc/routeTable:RouteTable example <id>

Constructors

Link copied to clipboard
constructor(associateType: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, routePropagationEnable: Output<Boolean>? = null, routeTableName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vpcId: Output<String>? = null)

Properties

Link copied to clipboard
val associateType: Output<String>? = null

The type of cloud resource that is bound to the routing table. Value:

Link copied to clipboard
val description: Output<String>? = null

Description of the routing table.

Link copied to clipboard
val name: Output<String>? = null

. Field 'name' has been deprecated from provider version 1.119.1. New field 'route_table_name' instead.

Link copied to clipboard
val routePropagationEnable: Output<Boolean>? = null

Route Table Receive Propagate Route State

Link copied to clipboard
val routeTableName: Output<String>? = null

The name of the routing table.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

The tag

Link copied to clipboard
val vpcId: Output<String>? = null

The ID of VPC. The following arguments will be discarded. Please use new fields as soon as possible:

Functions

Link copied to clipboard
open override fun toJava(): RouteTableArgs