title: "Route" title_tag: "huaweicloud.Vpc.Route" meta_desc: "Documentation for the huaweicloud.Vpc.Route resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Manages a VPC route resource within HuaweiCloud.
Add route to the default route table
using System.Collections.Generic;
using Pulumi;
using Huaweicloud = Pulumi.Huaweicloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var vpcId = config.RequireObject<dynamic>("vpcId");
var nexthop = config.RequireObject<dynamic>("nexthop");
var vpcRoute = new Huaweicloud.Vpc.Route("vpcRoute", new()
{
VpcId = vpcId,
Destination = "192.168.0.0/16",
Type = "peering",
Nexthop = nexthop,
});
});
package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/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, "")
vpcId := cfg.RequireObject("vpcId")
nexthop := cfg.RequireObject("nexthop")
_, err := Vpc.NewRoute(ctx, "vpcRoute", &Vpc.RouteArgs{
VpcId: pulumi.Any(vpcId),
Destination: pulumi.String("192.168.0.0/16"),
Type: pulumi.String("peering"),
Nexthop: pulumi.Any(nexthop),
})
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.huaweicloud.Vpc.Route;
import com.pulumi.huaweicloud.Vpc.RouteArgs;
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 vpcId = config.get("vpcId");
final var nexthop = config.get("nexthop");
var vpcRoute = new Route("vpcRoute", RouteArgs.builder()
.vpcId(vpcId)
.destination("192.168.0.0/16")
.type("peering")
.nexthop(nexthop)
.build());
}
}
import pulumi
import pulumi_huaweicloud as huaweicloud
config = pulumi.Config()
vpc_id = config.require_object("vpcId")
nexthop = config.require_object("nexthop")
vpc_route = huaweicloud.vpc.Route("vpcRoute",
vpc_id=vpc_id,
destination="192.168.0.0/16",
type="peering",
nexthop=nexthop)
import * as pulumi from "@pulumi/pulumi";
import * as pulumi from "@huaweicloudos/pulumi";
const config = new pulumi.Config();
const vpcId = config.requireObject("vpcId");
const nexthop = config.requireObject("nexthop");
const vpcRoute = new huaweicloud.vpc.Route("vpcRoute", {
vpcId: vpcId,
destination: "192.168.0.0/16",
type: "peering",
nexthop: nexthop,
});
configuration:
vpcId:
type: dynamic
nexthop:
type: dynamic
resources:
vpcRoute:
type: huaweicloud:Vpc:Route
properties:
vpcId: ${vpcId}
destination: 192.168.0.0/16
type: peering
nexthop: ${nexthop}
Add route to a custom route table
using System.Collections.Generic;
using Pulumi;
using Huaweicloud = Pulumi.Huaweicloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var vpcId = config.RequireObject<dynamic>("vpcId");
var nexthop = config.RequireObject<dynamic>("nexthop");
var rtb = Huaweicloud.Vpc.GetRouteTable.Invoke(new()
{
VpcId = vpcId,
Name = "demo",
});
var vpcRoute = new Huaweicloud.Vpc.Route("vpcRoute", new()
{
VpcId = vpcId,
RouteTableId = rtb.Apply(getRouteTableResult => getRouteTableResult.Id),
Destination = "172.16.8.0/24",
Type = "ecs",
Nexthop = nexthop,
});
});
package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Vpc"
"github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/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, "")
vpcId := cfg.RequireObject("vpcId")
nexthop := cfg.RequireObject("nexthop")
rtb, err := Vpc.GetRouteTable(ctx, &vpc.GetRouteTableArgs{
VpcId: vpcId,
Name: pulumi.StringRef("demo"),
}, nil)
if err != nil {
return err
}
_, err = Vpc.NewRoute(ctx, "vpcRoute", &Vpc.RouteArgs{
VpcId: pulumi.Any(vpcId),
RouteTableId: pulumi.String(rtb.Id),
Destination: pulumi.String("172.16.8.0/24"),
Type: pulumi.String("ecs"),
Nexthop: pulumi.Any(nexthop),
})
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.huaweicloud.Vpc.VpcFunctions;
import com.pulumi.huaweicloud.Vpc.inputs.GetRouteTableArgs;
import com.pulumi.huaweicloud.Vpc.Route;
import com.pulumi.huaweicloud.Vpc.RouteArgs;
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 vpcId = config.get("vpcId");
final var nexthop = config.get("nexthop");
final var rtb = VpcFunctions.getRouteTable(GetRouteTableArgs.builder()
.vpcId(vpcId)
.name("demo")
.build());
var vpcRoute = new Route("vpcRoute", RouteArgs.builder()
.vpcId(vpcId)
.routeTableId(rtb.applyValue(getRouteTableResult -> getRouteTableResult.id()))
.destination("172.16.8.0/24")
.type("ecs")
.nexthop(nexthop)
.build());
}
}
import pulumi
import pulumi_huaweicloud as huaweicloud
config = pulumi.Config()
vpc_id = config.require_object("vpcId")
nexthop = config.require_object("nexthop")
rtb = huaweicloud.Vpc.get_route_table(vpc_id=vpc_id,
name="demo")
vpc_route = huaweicloud.vpc.Route("vpcRoute",
vpc_id=vpc_id,
route_table_id=rtb.id,
destination="172.16.8.0/24",
type="ecs",
nexthop=nexthop)
import * as pulumi from "@pulumi/pulumi";
import * as huaweicloud from "@pulumi/huaweicloud";
import * as pulumi from "@huaweicloudos/pulumi";
const config = new pulumi.Config();
const vpcId = config.requireObject("vpcId");
const nexthop = config.requireObject("nexthop");
const rtb = huaweicloud.Vpc.getRouteTable({
vpcId: vpcId,
name: "demo",
});
const vpcRoute = new huaweicloud.vpc.Route("vpcRoute", {
vpcId: vpcId,
routeTableId: rtb.then(rtb => rtb.id),
destination: "172.16.8.0/24",
type: "ecs",
nexthop: nexthop,
});
configuration:
vpcId:
type: dynamic
nexthop:
type: dynamic
resources:
vpcRoute:
type: huaweicloud:Vpc:Route
properties:
vpcId: ${vpcId}
routeTableId: ${rtb.id}
destination: 172.16.8.0/24
type: ecs
nexthop: ${nexthop}
variables:
rtb:
Fn::Invoke:
Function: huaweicloud:Vpc:getRouteTable
Arguments:
vpcId: ${vpcId}
name: demo
Create Route Resource {#create}
new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);
@overload
def Route(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
destination: Optional[str] = None,
nexthop: Optional[str] = None,
region: Optional[str] = None,
route_table_id: Optional[str] = None,
type: Optional[str] = None,
vpc_id: Optional[str] = None)
@overload
def Route(resource_name: str,
args: RouteArgs,
opts: Optional[ResourceOptions] = None)
func NewRoute(ctx *Context, name string, args RouteArgs, opts ...ResourceOption) (*Route, error)
public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)
type: huaweicloud:Vpc:Route
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteArgs
- 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 RouteArgs
- 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 RouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Route Resource Properties {#properties}
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Route resource accepts the following input properties:
- Destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- Nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- Type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- Description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- Region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
Route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
- Destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- Nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- Type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- Description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- Region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
Route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
- destination String
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop String
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- type String
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description String
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- region String
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table StringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
- destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
- destination str
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop str
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- type str
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc_
id str - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description str
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- region str
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route_
table_ strid - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
- destination String
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop String
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- type String
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description String
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- region String
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table StringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
Outputs
All input properties are implicitly available as output properties. Additionally, the Route resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
-
Route
Table stringName The name of route table.
- Id string
The provider-assigned unique ID for this managed resource.
-
Route
Table stringName The name of route table.
- id String
The provider-assigned unique ID for this managed resource.
-
route
Table StringName The name of route table.
- id string
The provider-assigned unique ID for this managed resource.
-
route
Table stringName The name of route table.
- id str
The provider-assigned unique ID for this managed resource.
-
route_
table_ strname The name of route table.
- id String
The provider-assigned unique ID for this managed resource.
-
route
Table StringName The name of route table.
Look up Existing Route Resource {#look-up}
Get an existing Route 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?: RouteState, opts?: CustomResourceOptions): Route
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
destination: Optional[str] = None,
nexthop: Optional[str] = None,
region: Optional[str] = None,
route_table_id: Optional[str] = None,
route_table_name: Optional[str] = None,
type: Optional[str] = None,
vpc_id: Optional[str] = None) -> Route
func GetRoute(ctx *Context, name string, id IDInput, state *RouteState, opts ...ResourceOption) (*Route, error)
public static Route Get(string name, Input<string> id, RouteState? state, CustomResourceOptions? opts = null)
public static Route get(String name, Output<String> id, RouteState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- Destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- Nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- Region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
Route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
Route
Table stringName The name of route table.
- Type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- Description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- Destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- Nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- Region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
Route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
Route
Table stringName The name of route table.
- Type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description String
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- destination String
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop String
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- region String
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table StringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
route
Table StringName The name of route table.
- type String
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description string
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- destination string
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop string
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- region string
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table stringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
route
Table stringName The name of route table.
- type string
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description str
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- destination str
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop str
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- region str
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route_
table_ strid - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
route_
table_ strname The name of route table.
- type str
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc_
id str - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
- description String
- Specifies the supplementary information about the route. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
- destination String
- Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. The destination of each route must be unique and cannot overlap with any subnet in the VPC. Changing this creates a new resource.
- nexthop String
- Specifies the next hop.
- If the route type is ecs, the value is an ECS instance ID in the VPC.
- If the route type is eni, the value is the extension NIC of an ECS in the VPC.
- If the route type is vip, the value is a virtual IP address.
- If the route type is nat, the value is a VPN gateway ID.
- If the route type is peering, the value is a VPC peering connection ID.
- If the route type is vpn, the value is a VPN gateway ID.
- If the route type is dc, the value is a Direct Connect gateway ID.
- If the route type is cc, the value is a Cloud Connection ID.
- region String
The region in which to create the VPC route. If omitted, the provider-level region will be used. Changing this creates a new resource.
-
route
Table StringId - Specifies the route table ID for which a route is to be added. If the value is not set, the route will be added to the default route table.
-
route
Table StringName The name of route table.
- type String
- Specifies the route type. Currently, the value can be: ecs, eni, vip, nat, peering, vpn, dc and cc.
-
vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new resource.
Import
VPC routes can be imported using the route table ID and their destination
separated by a slash, e.g.
$ pulumi import huaweicloud:Vpc/route:Route test <route_table_id>/<destination>
Package Details
- Repository
- https://github.com/huaweicloud/pulumi-huaweicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
huaweicloud
Terraform Provider.