1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ErStaticRouteV3
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.ErStaticRouteV3

Explore with Pulumi AI

Manages a static route under the ER route table within OpenTelekomCloud.

Example Usage

Create a static route and cross the VPC

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const config = new pulumi.Config();
const routeTableId = config.requireObject("routeTableId");
const destinationVpcCidr = config.requireObject("destinationVpcCidr");
const sourceVpcAttachmentId = config.requireObject("sourceVpcAttachmentId");
const test = new opentelekomcloud.ErStaticRouteV3("test", {
    routeTableId: routeTableId,
    destination: destinationVpcCidr,
    attachmentId: sourceVpcAttachmentId,
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

config = pulumi.Config()
route_table_id = config.require_object("routeTableId")
destination_vpc_cidr = config.require_object("destinationVpcCidr")
source_vpc_attachment_id = config.require_object("sourceVpcAttachmentId")
test = opentelekomcloud.ErStaticRouteV3("test",
    route_table_id=route_table_id,
    destination=destination_vpc_cidr,
    attachment_id=source_vpc_attachment_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"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, "")
		routeTableId := cfg.RequireObject("routeTableId")
		destinationVpcCidr := cfg.RequireObject("destinationVpcCidr")
		sourceVpcAttachmentId := cfg.RequireObject("sourceVpcAttachmentId")
		_, err := opentelekomcloud.NewErStaticRouteV3(ctx, "test", &opentelekomcloud.ErStaticRouteV3Args{
			RouteTableId: pulumi.Any(routeTableId),
			Destination:  pulumi.Any(destinationVpcCidr),
			AttachmentId: pulumi.Any(sourceVpcAttachmentId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var routeTableId = config.RequireObject<dynamic>("routeTableId");
    var destinationVpcCidr = config.RequireObject<dynamic>("destinationVpcCidr");
    var sourceVpcAttachmentId = config.RequireObject<dynamic>("sourceVpcAttachmentId");
    var test = new Opentelekomcloud.ErStaticRouteV3("test", new()
    {
        RouteTableId = routeTableId,
        Destination = destinationVpcCidr,
        AttachmentId = sourceVpcAttachmentId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ErStaticRouteV3;
import com.pulumi.opentelekomcloud.ErStaticRouteV3Args;
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 routeTableId = config.get("routeTableId");
        final var destinationVpcCidr = config.get("destinationVpcCidr");
        final var sourceVpcAttachmentId = config.get("sourceVpcAttachmentId");
        var test = new ErStaticRouteV3("test", ErStaticRouteV3Args.builder()
            .routeTableId(routeTableId)
            .destination(destinationVpcCidr)
            .attachmentId(sourceVpcAttachmentId)
            .build());

    }
}
Copy
configuration:
  routeTableId:
    type: dynamic
  destinationVpcCidr:
    type: dynamic
  sourceVpcAttachmentId:
    type: dynamic
resources:
  test:
    type: opentelekomcloud:ErStaticRouteV3
    properties:
      routeTableId: ${routeTableId}
      destination: ${destinationVpcCidr}
      attachmentId: ${sourceVpcAttachmentId}
Copy

Create a black hole route

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const config = new pulumi.Config();
const routeTableId = config.requireObject("routeTableId");
const destinationVpcCidr = config.requireObject("destinationVpcCidr");
const test = new opentelekomcloud.ErStaticRouteV3("test", {
    routeTableId: routeTableId,
    destination: destinationVpcCidr,
    isBlackhole: true,
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

config = pulumi.Config()
route_table_id = config.require_object("routeTableId")
destination_vpc_cidr = config.require_object("destinationVpcCidr")
test = opentelekomcloud.ErStaticRouteV3("test",
    route_table_id=route_table_id,
    destination=destination_vpc_cidr,
    is_blackhole=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"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, "")
		routeTableId := cfg.RequireObject("routeTableId")
		destinationVpcCidr := cfg.RequireObject("destinationVpcCidr")
		_, err := opentelekomcloud.NewErStaticRouteV3(ctx, "test", &opentelekomcloud.ErStaticRouteV3Args{
			RouteTableId: pulumi.Any(routeTableId),
			Destination:  pulumi.Any(destinationVpcCidr),
			IsBlackhole:  pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var routeTableId = config.RequireObject<dynamic>("routeTableId");
    var destinationVpcCidr = config.RequireObject<dynamic>("destinationVpcCidr");
    var test = new Opentelekomcloud.ErStaticRouteV3("test", new()
    {
        RouteTableId = routeTableId,
        Destination = destinationVpcCidr,
        IsBlackhole = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ErStaticRouteV3;
import com.pulumi.opentelekomcloud.ErStaticRouteV3Args;
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 routeTableId = config.get("routeTableId");
        final var destinationVpcCidr = config.get("destinationVpcCidr");
        var test = new ErStaticRouteV3("test", ErStaticRouteV3Args.builder()
            .routeTableId(routeTableId)
            .destination(destinationVpcCidr)
            .isBlackhole(true)
            .build());

    }
}
Copy
configuration:
  routeTableId:
    type: dynamic
  destinationVpcCidr:
    type: dynamic
resources:
  test:
    type: opentelekomcloud:ErStaticRouteV3
    properties:
      routeTableId: ${routeTableId}
      destination: ${destinationVpcCidr}
      isBlackhole: true
Copy

Create ErStaticRouteV3 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ErStaticRouteV3(name: string, args: ErStaticRouteV3Args, opts?: CustomResourceOptions);
@overload
def ErStaticRouteV3(resource_name: str,
                    args: ErStaticRouteV3Args,
                    opts: Optional[ResourceOptions] = None)

@overload
def ErStaticRouteV3(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    destination: Optional[str] = None,
                    route_table_id: Optional[str] = None,
                    attachment_id: Optional[str] = None,
                    er_static_route_v3_id: Optional[str] = None,
                    is_blackhole: Optional[bool] = None,
                    timeouts: Optional[ErStaticRouteV3TimeoutsArgs] = None)
func NewErStaticRouteV3(ctx *Context, name string, args ErStaticRouteV3Args, opts ...ResourceOption) (*ErStaticRouteV3, error)
public ErStaticRouteV3(string name, ErStaticRouteV3Args args, CustomResourceOptions? opts = null)
public ErStaticRouteV3(String name, ErStaticRouteV3Args args)
public ErStaticRouteV3(String name, ErStaticRouteV3Args args, CustomResourceOptions options)
type: opentelekomcloud:ErStaticRouteV3
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ErStaticRouteV3Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ErStaticRouteV3Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ErStaticRouteV3Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ErStaticRouteV3Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ErStaticRouteV3Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var erStaticRouteV3Resource = new Opentelekomcloud.ErStaticRouteV3("erStaticRouteV3Resource", new()
{
    Destination = "string",
    RouteTableId = "string",
    AttachmentId = "string",
    ErStaticRouteV3Id = "string",
    IsBlackhole = false,
    Timeouts = new Opentelekomcloud.Inputs.ErStaticRouteV3TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := opentelekomcloud.NewErStaticRouteV3(ctx, "erStaticRouteV3Resource", &opentelekomcloud.ErStaticRouteV3Args{
Destination: pulumi.String("string"),
RouteTableId: pulumi.String("string"),
AttachmentId: pulumi.String("string"),
ErStaticRouteV3Id: pulumi.String("string"),
IsBlackhole: pulumi.Bool(false),
Timeouts: &.ErStaticRouteV3TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var erStaticRouteV3Resource = new ErStaticRouteV3("erStaticRouteV3Resource", ErStaticRouteV3Args.builder()
    .destination("string")
    .routeTableId("string")
    .attachmentId("string")
    .erStaticRouteV3Id("string")
    .isBlackhole(false)
    .timeouts(ErStaticRouteV3TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
er_static_route_v3_resource = opentelekomcloud.ErStaticRouteV3("erStaticRouteV3Resource",
    destination="string",
    route_table_id="string",
    attachment_id="string",
    er_static_route_v3_id="string",
    is_blackhole=False,
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const erStaticRouteV3Resource = new opentelekomcloud.ErStaticRouteV3("erStaticRouteV3Resource", {
    destination: "string",
    routeTableId: "string",
    attachmentId: "string",
    erStaticRouteV3Id: "string",
    isBlackhole: false,
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: opentelekomcloud:ErStaticRouteV3
properties:
    attachmentId: string
    destination: string
    erStaticRouteV3Id: string
    isBlackhole: false
    routeTableId: string
    timeouts:
        create: string
        delete: string
        update: string
Copy

ErStaticRouteV3 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 ErStaticRouteV3 resource accepts the following input properties:

Destination This property is required. string
Specifies the destination of the static route.
RouteTableId This property is required. string
Specifies the ID of the route table to which the static route belongs.
AttachmentId string
Specifies the ID of the corresponding attachment.
ErStaticRouteV3Id string
The resource ID.
IsBlackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
Timeouts ErStaticRouteV3Timeouts
Destination This property is required. string
Specifies the destination of the static route.
RouteTableId This property is required. string
Specifies the ID of the route table to which the static route belongs.
AttachmentId string
Specifies the ID of the corresponding attachment.
ErStaticRouteV3Id string
The resource ID.
IsBlackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
Timeouts ErStaticRouteV3TimeoutsArgs
destination This property is required. String
Specifies the destination of the static route.
routeTableId This property is required. String
Specifies the ID of the route table to which the static route belongs.
attachmentId String
Specifies the ID of the corresponding attachment.
erStaticRouteV3Id String
The resource ID.
isBlackhole Boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
timeouts ErStaticRouteV3Timeouts
destination This property is required. string
Specifies the destination of the static route.
routeTableId This property is required. string
Specifies the ID of the route table to which the static route belongs.
attachmentId string
Specifies the ID of the corresponding attachment.
erStaticRouteV3Id string
The resource ID.
isBlackhole boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
timeouts ErStaticRouteV3Timeouts
destination This property is required. str
Specifies the destination of the static route.
route_table_id This property is required. str
Specifies the ID of the route table to which the static route belongs.
attachment_id str
Specifies the ID of the corresponding attachment.
er_static_route_v3_id str
The resource ID.
is_blackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
timeouts ErStaticRouteV3TimeoutsArgs
destination This property is required. String
Specifies the destination of the static route.
routeTableId This property is required. String
Specifies the ID of the route table to which the static route belongs.
attachmentId String
Specifies the ID of the corresponding attachment.
erStaticRouteV3Id String
The resource ID.
isBlackhole Boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the ErStaticRouteV3 resource produces the following output properties:

CreatedAt string
The creation time of the static route.
Id string
The provider-assigned unique ID for this managed resource.
Region string
The region where the static route and related route table are located.
Status string
The current status of the static route.
Type string
The type of the static route.
UpdatedAt string
The latest update time of the static route.
CreatedAt string
The creation time of the static route.
Id string
The provider-assigned unique ID for this managed resource.
Region string
The region where the static route and related route table are located.
Status string
The current status of the static route.
Type string
The type of the static route.
UpdatedAt string
The latest update time of the static route.
createdAt String
The creation time of the static route.
id String
The provider-assigned unique ID for this managed resource.
region String
The region where the static route and related route table are located.
status String
The current status of the static route.
type String
The type of the static route.
updatedAt String
The latest update time of the static route.
createdAt string
The creation time of the static route.
id string
The provider-assigned unique ID for this managed resource.
region string
The region where the static route and related route table are located.
status string
The current status of the static route.
type string
The type of the static route.
updatedAt string
The latest update time of the static route.
created_at str
The creation time of the static route.
id str
The provider-assigned unique ID for this managed resource.
region str
The region where the static route and related route table are located.
status str
The current status of the static route.
type str
The type of the static route.
updated_at str
The latest update time of the static route.
createdAt String
The creation time of the static route.
id String
The provider-assigned unique ID for this managed resource.
region String
The region where the static route and related route table are located.
status String
The current status of the static route.
type String
The type of the static route.
updatedAt String
The latest update time of the static route.

Look up Existing ErStaticRouteV3 Resource

Get an existing ErStaticRouteV3 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?: ErStaticRouteV3State, opts?: CustomResourceOptions): ErStaticRouteV3
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attachment_id: Optional[str] = None,
        created_at: Optional[str] = None,
        destination: Optional[str] = None,
        er_static_route_v3_id: Optional[str] = None,
        is_blackhole: Optional[bool] = None,
        region: Optional[str] = None,
        route_table_id: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[ErStaticRouteV3TimeoutsArgs] = None,
        type: Optional[str] = None,
        updated_at: Optional[str] = None) -> ErStaticRouteV3
func GetErStaticRouteV3(ctx *Context, name string, id IDInput, state *ErStaticRouteV3State, opts ...ResourceOption) (*ErStaticRouteV3, error)
public static ErStaticRouteV3 Get(string name, Input<string> id, ErStaticRouteV3State? state, CustomResourceOptions? opts = null)
public static ErStaticRouteV3 get(String name, Output<String> id, ErStaticRouteV3State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:ErStaticRouteV3    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AttachmentId string
Specifies the ID of the corresponding attachment.
CreatedAt string
The creation time of the static route.
Destination string
Specifies the destination of the static route.
ErStaticRouteV3Id string
The resource ID.
IsBlackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
Region string
The region where the static route and related route table are located.
RouteTableId string
Specifies the ID of the route table to which the static route belongs.
Status string
The current status of the static route.
Timeouts ErStaticRouteV3Timeouts
Type string
The type of the static route.
UpdatedAt string
The latest update time of the static route.
AttachmentId string
Specifies the ID of the corresponding attachment.
CreatedAt string
The creation time of the static route.
Destination string
Specifies the destination of the static route.
ErStaticRouteV3Id string
The resource ID.
IsBlackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
Region string
The region where the static route and related route table are located.
RouteTableId string
Specifies the ID of the route table to which the static route belongs.
Status string
The current status of the static route.
Timeouts ErStaticRouteV3TimeoutsArgs
Type string
The type of the static route.
UpdatedAt string
The latest update time of the static route.
attachmentId String
Specifies the ID of the corresponding attachment.
createdAt String
The creation time of the static route.
destination String
Specifies the destination of the static route.
erStaticRouteV3Id String
The resource ID.
isBlackhole Boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
region String
The region where the static route and related route table are located.
routeTableId String
Specifies the ID of the route table to which the static route belongs.
status String
The current status of the static route.
timeouts ErStaticRouteV3Timeouts
type String
The type of the static route.
updatedAt String
The latest update time of the static route.
attachmentId string
Specifies the ID of the corresponding attachment.
createdAt string
The creation time of the static route.
destination string
Specifies the destination of the static route.
erStaticRouteV3Id string
The resource ID.
isBlackhole boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
region string
The region where the static route and related route table are located.
routeTableId string
Specifies the ID of the route table to which the static route belongs.
status string
The current status of the static route.
timeouts ErStaticRouteV3Timeouts
type string
The type of the static route.
updatedAt string
The latest update time of the static route.
attachment_id str
Specifies the ID of the corresponding attachment.
created_at str
The creation time of the static route.
destination str
Specifies the destination of the static route.
er_static_route_v3_id str
The resource ID.
is_blackhole bool
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
region str
The region where the static route and related route table are located.
route_table_id str
Specifies the ID of the route table to which the static route belongs.
status str
The current status of the static route.
timeouts ErStaticRouteV3TimeoutsArgs
type str
The type of the static route.
updated_at str
The latest update time of the static route.
attachmentId String
Specifies the ID of the corresponding attachment.
createdAt String
The creation time of the static route.
destination String
Specifies the destination of the static route.
erStaticRouteV3Id String
The resource ID.
isBlackhole Boolean
Specifies whether route is the black hole route, defaults to false.

  • If the value is empty or false, the parameter attachment_id is required.
  • If the value is true, the parameter attachment_id must be empty.
region String
The region where the static route and related route table are located.
routeTableId String
Specifies the ID of the route table to which the static route belongs.
status String
The current status of the static route.
timeouts Property Map
type String
The type of the static route.
updatedAt String
The latest update time of the static route.

Supporting Types

ErStaticRouteV3Timeouts
, ErStaticRouteV3TimeoutsArgs

Create string
Delete string
Update string
Create string
Delete string
Update string
create String
delete String
update String
create string
delete string
update string
create str
delete str
update str
create String
delete String
update String

Import

Static routes can be imported using the related route_table_id and their id, separated by a slash (/), e.g.

bash

$ pulumi import opentelekomcloud:index/erStaticRouteV3:ErStaticRouteV3 test <route_table_id>/<id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.