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,
});
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)
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
})
}
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,
});
});
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());
}
}
configuration:
routeTableId:
type: dynamic
destinationVpcCidr:
type: dynamic
sourceVpcAttachmentId:
type: dynamic
resources:
test:
type: opentelekomcloud:ErStaticRouteV3
properties:
routeTableId: ${routeTableId}
destination: ${destinationVpcCidr}
attachmentId: ${sourceVpcAttachmentId}
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,
});
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)
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
})
}
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,
});
});
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());
}
}
configuration:
routeTableId:
type: dynamic
destinationVpcCidr:
type: dynamic
resources:
test:
type: opentelekomcloud:ErStaticRouteV3
properties:
routeTableId: ${routeTableId}
destination: ${destinationVpcCidr}
isBlackhole: true
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 string
- The unique name of the resource.
- args ErStaticRouteV3Args
- 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 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 string
- The unique name of the resource.
- args ErStaticRouteV3Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ErStaticRouteV3Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
});
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: &opentelekomcloud.ErStaticRouteV3TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
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());
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",
})
const erStaticRouteV3Resource = new opentelekomcloud.ErStaticRouteV3("erStaticRouteV3Resource", {
destination: "string",
routeTableId: "string",
attachmentId: "string",
erStaticRouteV3Id: "string",
isBlackhole: false,
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: opentelekomcloud:ErStaticRouteV3
properties:
attachmentId: string
destination: string
erStaticRouteV3Id: string
isBlackhole: false
routeTableId: string
timeouts:
create: string
delete: string
update: string
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 string
- Specifies the destination of the static route.
- Route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- Attachment
Id string - Specifies the ID of the corresponding attachment.
- Er
Static stringRoute V3Id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- Timeouts
Er
Static Route V3Timeouts
- Destination string
- Specifies the destination of the static route.
- Route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- Attachment
Id string - Specifies the ID of the corresponding attachment.
- Er
Static stringRoute V3Id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- Timeouts
Er
Static Route V3Timeouts Args
- destination String
- Specifies the destination of the static route.
- route
Table StringId - Specifies the ID of the route table to which the static route belongs.
- attachment
Id String - Specifies the ID of the corresponding attachment.
- er
Static StringRoute V3Id - The resource ID.
- is
Blackhole Boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- timeouts
Er
Static Route V3Timeouts
- destination string
- Specifies the destination of the static route.
- route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- attachment
Id string - Specifies the ID of the corresponding attachment.
- er
Static stringRoute V3Id - The resource ID.
- is
Blackhole boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- timeouts
Er
Static Route V3Timeouts
- destination str
- Specifies the destination of the static route.
- route_
table_ strid - 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_ strroute_ v3_ id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- timeouts
Er
Static Route V3Timeouts Args
- destination String
- Specifies the destination of the static route.
- route
Table StringId - Specifies the ID of the route table to which the static route belongs.
- attachment
Id String - Specifies the ID of the corresponding attachment.
- er
Static StringRoute V3Id - The resource ID.
- is
Blackhole Boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ErStaticRouteV3 resource produces the following output properties:
- Created
At 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.
- Updated
At string - The latest update time of the static route.
- Created
At 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.
- Updated
At string - The latest update time of the static route.
- created
At 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.
- updated
At String - The latest update time of the static route.
- created
At 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.
- updated
At 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.
- created
At 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.
- updated
At 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
- 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.
- Attachment
Id string - Specifies the ID of the corresponding attachment.
- Created
At string - The creation time of the static route.
- Destination string
- Specifies the destination of the static route.
- Er
Static stringRoute V3Id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- Region string
- The region where the static route and related route table are located.
- Route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- Status string
- The current status of the static route.
- Timeouts
Er
Static Route V3Timeouts - Type string
- The type of the static route.
- Updated
At string - The latest update time of the static route.
- Attachment
Id string - Specifies the ID of the corresponding attachment.
- Created
At string - The creation time of the static route.
- Destination string
- Specifies the destination of the static route.
- Er
Static stringRoute V3Id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- Region string
- The region where the static route and related route table are located.
- Route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- Status string
- The current status of the static route.
- Timeouts
Er
Static Route V3Timeouts Args - Type string
- The type of the static route.
- Updated
At string - The latest update time of the static route.
- attachment
Id String - Specifies the ID of the corresponding attachment.
- created
At String - The creation time of the static route.
- destination String
- Specifies the destination of the static route.
- er
Static StringRoute V3Id - The resource ID.
- is
Blackhole Boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- region String
- The region where the static route and related route table are located.
- route
Table StringId - Specifies the ID of the route table to which the static route belongs.
- status String
- The current status of the static route.
- timeouts
Er
Static Route V3Timeouts - type String
- The type of the static route.
- updated
At String - The latest update time of the static route.
- attachment
Id string - Specifies the ID of the corresponding attachment.
- created
At string - The creation time of the static route.
- destination string
- Specifies the destination of the static route.
- er
Static stringRoute V3Id - The resource ID.
- is
Blackhole boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- region string
- The region where the static route and related route table are located.
- route
Table stringId - Specifies the ID of the route table to which the static route belongs.
- status string
- The current status of the static route.
- timeouts
Er
Static Route V3Timeouts - type string
- The type of the static route.
- updated
At 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_ strroute_ v3_ id - 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 parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- region str
- The region where the static route and related route table are located.
- route_
table_ strid - Specifies the ID of the route table to which the static route belongs.
- status str
- The current status of the static route.
- timeouts
Er
Static Route V3Timeouts Args - type str
- The type of the static route.
- updated_
at str - The latest update time of the static route.
- attachment
Id String - Specifies the ID of the corresponding attachment.
- created
At String - The creation time of the static route.
- destination String
- Specifies the destination of the static route.
- er
Static StringRoute V3Id - The resource ID.
- is
Blackhole Boolean - Specifies whether route is the black hole route, defaults to
false
.- If the value is empty or
false
, the parameterattachment_id
is required. - If the value is
true
, the parameterattachment_id
must be empty.
- If the value is empty or
- region String
- The region where the static route and related route table are located.
- route
Table StringId - 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.
- updated
At String - The latest update time of the static route.
Supporting Types
ErStaticRouteV3Timeouts, ErStaticRouteV3TimeoutsArgs
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>
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.