opentelekomcloud.VpcRouteV2
Explore with Pulumi AI
Up-to-date reference of API arguments for VPC route you can get at documentation portal
Provides a resource to create a route within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const vpcRoute = new opentelekomcloud.VpcRouteV2("vpcRoute", {
type: "peering",
nexthop: _var.nexthop,
destination: "192.168.0.0/16",
vpcId: _var.vpc_id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
vpc_route = opentelekomcloud.VpcRouteV2("vpcRoute",
type="peering",
nexthop=var["nexthop"],
destination="192.168.0.0/16",
vpc_id=var["vpc_id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.NewVpcRouteV2(ctx, "vpcRoute", &opentelekomcloud.VpcRouteV2Args{
Type: pulumi.String("peering"),
Nexthop: pulumi.Any(_var.Nexthop),
Destination: pulumi.String("192.168.0.0/16"),
VpcId: pulumi.Any(_var.Vpc_id),
})
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 vpcRoute = new Opentelekomcloud.VpcRouteV2("vpcRoute", new()
{
Type = "peering",
Nexthop = @var.Nexthop,
Destination = "192.168.0.0/16",
VpcId = @var.Vpc_id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.VpcRouteV2;
import com.pulumi.opentelekomcloud.VpcRouteV2Args;
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 vpcRoute = new VpcRouteV2("vpcRoute", VpcRouteV2Args.builder()
.type("peering")
.nexthop(var_.nexthop())
.destination("192.168.0.0/16")
.vpcId(var_.vpc_id())
.build());
}
}
resources:
vpcRoute:
type: opentelekomcloud:VpcRouteV2
properties:
type: peering
nexthop: ${var.nexthop}
destination: 192.168.0.0/16
vpcId: ${var.vpc_id}
Create VpcRouteV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcRouteV2(name: string, args: VpcRouteV2Args, opts?: CustomResourceOptions);
@overload
def VpcRouteV2(resource_name: str,
args: VpcRouteV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def VpcRouteV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[str] = None,
nexthop: Optional[str] = None,
type: Optional[str] = None,
vpc_id: Optional[str] = None,
region: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[VpcRouteV2TimeoutsArgs] = None,
vpc_route_v2_id: Optional[str] = None)
func NewVpcRouteV2(ctx *Context, name string, args VpcRouteV2Args, opts ...ResourceOption) (*VpcRouteV2, error)
public VpcRouteV2(string name, VpcRouteV2Args args, CustomResourceOptions? opts = null)
public VpcRouteV2(String name, VpcRouteV2Args args)
public VpcRouteV2(String name, VpcRouteV2Args args, CustomResourceOptions options)
type: opentelekomcloud:VpcRouteV2
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 VpcRouteV2Args
- 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 VpcRouteV2Args
- 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 VpcRouteV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcRouteV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcRouteV2Args
- 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 vpcRouteV2Resource = new Opentelekomcloud.VpcRouteV2("vpcRouteV2Resource", new()
{
Destination = "string",
Nexthop = "string",
Type = "string",
VpcId = "string",
Region = "string",
TenantId = "string",
Timeouts = new Opentelekomcloud.Inputs.VpcRouteV2TimeoutsArgs
{
Create = "string",
Delete = "string",
},
VpcRouteV2Id = "string",
});
example, err := opentelekomcloud.NewVpcRouteV2(ctx, "vpcRouteV2Resource", &opentelekomcloud.VpcRouteV2Args{
Destination: pulumi.String("string"),
Nexthop: pulumi.String("string"),
Type: pulumi.String("string"),
VpcId: pulumi.String("string"),
Region: pulumi.String("string"),
TenantId: pulumi.String("string"),
Timeouts: &opentelekomcloud.VpcRouteV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcRouteV2Id: pulumi.String("string"),
})
var vpcRouteV2Resource = new VpcRouteV2("vpcRouteV2Resource", VpcRouteV2Args.builder()
.destination("string")
.nexthop("string")
.type("string")
.vpcId("string")
.region("string")
.tenantId("string")
.timeouts(VpcRouteV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vpcRouteV2Id("string")
.build());
vpc_route_v2_resource = opentelekomcloud.VpcRouteV2("vpcRouteV2Resource",
destination="string",
nexthop="string",
type="string",
vpc_id="string",
region="string",
tenant_id="string",
timeouts={
"create": "string",
"delete": "string",
},
vpc_route_v2_id="string")
const vpcRouteV2Resource = new opentelekomcloud.VpcRouteV2("vpcRouteV2Resource", {
destination: "string",
nexthop: "string",
type: "string",
vpcId: "string",
region: "string",
tenantId: "string",
timeouts: {
create: "string",
"delete": "string",
},
vpcRouteV2Id: "string",
});
type: opentelekomcloud:VpcRouteV2
properties:
destination: string
nexthop: string
region: string
tenantId: string
timeouts:
create: string
delete: string
type: string
vpcId: string
vpcRouteV2Id: string
VpcRouteV2 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 VpcRouteV2 resource accepts the following input properties:
- Destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- Nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- Type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- Region string
- Tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- Timeouts
Vpc
Route V2Timeouts - Vpc
Route stringV2Id - The route ID.
- Destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- Nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- Type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- Region string
- Tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- Timeouts
Vpc
Route V2Timeouts Args - Vpc
Route stringV2Id - The route ID.
- destination String
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop String
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- type String
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- region String
- tenant
Id String - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts - vpc
Route StringV2Id - The route ID.
- destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- region string
- tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts - vpc
Route stringV2Id - The route ID.
- destination str
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop str
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- type str
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc_
id str - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- region str
- tenant_
id str - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts Args - vpc_
route_ strv2_ id - The route ID.
- destination String
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop String
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- type String
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- region String
- tenant
Id String - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts Property Map
- vpc
Route StringV2Id - The route ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcRouteV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VpcRouteV2 Resource
Get an existing VpcRouteV2 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?: VpcRouteV2State, opts?: CustomResourceOptions): VpcRouteV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[str] = None,
nexthop: Optional[str] = None,
region: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[VpcRouteV2TimeoutsArgs] = None,
type: Optional[str] = None,
vpc_id: Optional[str] = None,
vpc_route_v2_id: Optional[str] = None) -> VpcRouteV2
func GetVpcRouteV2(ctx *Context, name string, id IDInput, state *VpcRouteV2State, opts ...ResourceOption) (*VpcRouteV2, error)
public static VpcRouteV2 Get(string name, Input<string> id, VpcRouteV2State? state, CustomResourceOptions? opts = null)
public static VpcRouteV2 get(String name, Output<String> id, VpcRouteV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:VpcRouteV2 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.
- Destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- Nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- Region string
- Tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- Timeouts
Vpc
Route V2Timeouts - Type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- Vpc
Route stringV2Id - The route ID.
- Destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- Nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- Region string
- Tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- Timeouts
Vpc
Route V2Timeouts Args - Type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - Vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- Vpc
Route stringV2Id - The route ID.
- destination String
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop String
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- region String
- tenant
Id String - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts - type String
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- vpc
Route StringV2Id - The route ID.
- destination string
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop string
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- region string
- tenant
Id string - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts - type string
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id string - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- vpc
Route stringV2Id - The route ID.
- destination str
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop str
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- region str
- tenant_
id str - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts
Vpc
Route V2Timeouts Args - type str
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc_
id str - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- vpc_
route_ strv2_ id - The route ID.
- destination String
- Specifies the destination IP address or CIDR block. Changing this creates a new Route.
- nexthop String
- Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
- region String
- tenant
Id String - Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
- timeouts Property Map
- type String
- Specifies the route type. Currently, the value can only be
peering
. Changing this creates a new Route. - vpc
Id String - Specifies the VPC for which a route is to be added. Changing this creates a new Route.
- vpc
Route StringV2Id - The route ID.
Supporting Types
VpcRouteV2Timeouts, VpcRouteV2TimeoutsArgs
Import
VPC route can be imported using the id
, e.g.
$ pulumi import opentelekomcloud:index/vpcRouteV2:VpcRouteV2 vpc_route 2c7fs9f3-712b-18d1-940c-b50384177ee1
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.