opentelekomcloud.NetworkingRouterRouteV2
Explore with Pulumi AI
Up-to-date reference of API arguments for VPC router route you can get at documentation portal
DEPRECATED Creates a routing entry on a OpenTelekomCloud V2 router.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const router1 = new opentelekomcloud.NetworkingRouterV2("router1", {adminStateUp: true});
const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
networkId: network1.networkingNetworkV2Id,
cidr: "192.168.199.0/24",
ipVersion: 4,
});
const int1 = new opentelekomcloud.NetworkingRouterInterfaceV2("int1", {
routerId: router1.networkingRouterV2Id,
subnetId: subnet1.networkingSubnetV2Id,
});
const routerRoute1 = new opentelekomcloud.NetworkingRouterRouteV2("routerRoute1", {
routerId: router1.networkingRouterV2Id,
destinationCidr: "10.0.1.0/24",
nextHop: "192.168.199.254",
}, {
dependsOn: ["opentelekomcloud_networking_router_interface_v2.int_1"],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
router1 = opentelekomcloud.NetworkingRouterV2("router1", admin_state_up=True)
network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
network_id=network1.networking_network_v2_id,
cidr="192.168.199.0/24",
ip_version=4)
int1 = opentelekomcloud.NetworkingRouterInterfaceV2("int1",
router_id=router1.networking_router_v2_id,
subnet_id=subnet1.networking_subnet_v2_id)
router_route1 = opentelekomcloud.NetworkingRouterRouteV2("routerRoute1",
router_id=router1.networking_router_v2_id,
destination_cidr="10.0.1.0/24",
next_hop="192.168.199.254",
opts = pulumi.ResourceOptions(depends_on=["opentelekomcloud_networking_router_interface_v2.int_1"]))
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 {
router1, err := opentelekomcloud.NewNetworkingRouterV2(ctx, "router1", &opentelekomcloud.NetworkingRouterV2Args{
AdminStateUp: pulumi.Bool(true),
})
if err != nil {
return err
}
network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
AdminStateUp: pulumi.String("true"),
})
if err != nil {
return err
}
subnet1, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
NetworkId: network1.NetworkingNetworkV2Id,
Cidr: pulumi.String("192.168.199.0/24"),
IpVersion: pulumi.Float64(4),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingRouterInterfaceV2(ctx, "int1", &opentelekomcloud.NetworkingRouterInterfaceV2Args{
RouterId: router1.NetworkingRouterV2Id,
SubnetId: subnet1.NetworkingSubnetV2Id,
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingRouterRouteV2(ctx, "routerRoute1", &opentelekomcloud.NetworkingRouterRouteV2Args{
RouterId: router1.NetworkingRouterV2Id,
DestinationCidr: pulumi.String("10.0.1.0/24"),
NextHop: pulumi.String("192.168.199.254"),
}, pulumi.DependsOn([]pulumi.Resource{
pulumi.Resource("opentelekomcloud_networking_router_interface_v2.int_1"),
}))
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 router1 = new Opentelekomcloud.NetworkingRouterV2("router1", new()
{
AdminStateUp = true,
});
var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
{
AdminStateUp = "true",
});
var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
{
NetworkId = network1.NetworkingNetworkV2Id,
Cidr = "192.168.199.0/24",
IpVersion = 4,
});
var int1 = new Opentelekomcloud.NetworkingRouterInterfaceV2("int1", new()
{
RouterId = router1.NetworkingRouterV2Id,
SubnetId = subnet1.NetworkingSubnetV2Id,
});
var routerRoute1 = new Opentelekomcloud.NetworkingRouterRouteV2("routerRoute1", new()
{
RouterId = router1.NetworkingRouterV2Id,
DestinationCidr = "10.0.1.0/24",
NextHop = "192.168.199.254",
}, new CustomResourceOptions
{
DependsOn =
{
"opentelekomcloud_networking_router_interface_v2.int_1",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingRouterV2;
import com.pulumi.opentelekomcloud.NetworkingRouterV2Args;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterRouteV2;
import com.pulumi.opentelekomcloud.NetworkingRouterRouteV2Args;
import com.pulumi.resources.CustomResourceOptions;
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 router1 = new NetworkingRouterV2("router1", NetworkingRouterV2Args.builder()
.adminStateUp("true")
.build());
var network1 = new NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
.adminStateUp("true")
.build());
var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
.networkId(network1.networkingNetworkV2Id())
.cidr("192.168.199.0/24")
.ipVersion(4)
.build());
var int1 = new NetworkingRouterInterfaceV2("int1", NetworkingRouterInterfaceV2Args.builder()
.routerId(router1.networkingRouterV2Id())
.subnetId(subnet1.networkingSubnetV2Id())
.build());
var routerRoute1 = new NetworkingRouterRouteV2("routerRoute1", NetworkingRouterRouteV2Args.builder()
.routerId(router1.networkingRouterV2Id())
.destinationCidr("10.0.1.0/24")
.nextHop("192.168.199.254")
.build(), CustomResourceOptions.builder()
.dependsOn("opentelekomcloud_networking_router_interface_v2.int_1")
.build());
}
}
resources:
router1:
type: opentelekomcloud:NetworkingRouterV2
properties:
adminStateUp: 'true'
network1:
type: opentelekomcloud:NetworkingNetworkV2
properties:
adminStateUp: 'true'
subnet1:
type: opentelekomcloud:NetworkingSubnetV2
properties:
networkId: ${network1.networkingNetworkV2Id}
cidr: 192.168.199.0/24
ipVersion: 4
int1:
type: opentelekomcloud:NetworkingRouterInterfaceV2
properties:
routerId: ${router1.networkingRouterV2Id}
subnetId: ${subnet1.networkingSubnetV2Id}
routerRoute1:
type: opentelekomcloud:NetworkingRouterRouteV2
properties:
routerId: ${router1.networkingRouterV2Id}
destinationCidr: 10.0.1.0/24
nextHop: 192.168.199.254
options:
dependsOn:
- opentelekomcloud_networking_router_interface_v2.int_1
Create NetworkingRouterRouteV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingRouterRouteV2(name: string, args: NetworkingRouterRouteV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingRouterRouteV2(resource_name: str,
args: NetworkingRouterRouteV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingRouterRouteV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_cidr: Optional[str] = None,
next_hop: Optional[str] = None,
router_id: Optional[str] = None,
networking_router_route_v2_id: Optional[str] = None,
region: Optional[str] = None)
func NewNetworkingRouterRouteV2(ctx *Context, name string, args NetworkingRouterRouteV2Args, opts ...ResourceOption) (*NetworkingRouterRouteV2, error)
public NetworkingRouterRouteV2(string name, NetworkingRouterRouteV2Args args, CustomResourceOptions? opts = null)
public NetworkingRouterRouteV2(String name, NetworkingRouterRouteV2Args args)
public NetworkingRouterRouteV2(String name, NetworkingRouterRouteV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingRouterRouteV2
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 NetworkingRouterRouteV2Args
- 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 NetworkingRouterRouteV2Args
- 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 NetworkingRouterRouteV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingRouterRouteV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingRouterRouteV2Args
- 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 networkingRouterRouteV2Resource = new Opentelekomcloud.NetworkingRouterRouteV2("networkingRouterRouteV2Resource", new()
{
DestinationCidr = "string",
NextHop = "string",
RouterId = "string",
NetworkingRouterRouteV2Id = "string",
Region = "string",
});
example, err := opentelekomcloud.NewNetworkingRouterRouteV2(ctx, "networkingRouterRouteV2Resource", &opentelekomcloud.NetworkingRouterRouteV2Args{
DestinationCidr: pulumi.String("string"),
NextHop: pulumi.String("string"),
RouterId: pulumi.String("string"),
NetworkingRouterRouteV2Id: pulumi.String("string"),
Region: pulumi.String("string"),
})
var networkingRouterRouteV2Resource = new NetworkingRouterRouteV2("networkingRouterRouteV2Resource", NetworkingRouterRouteV2Args.builder()
.destinationCidr("string")
.nextHop("string")
.routerId("string")
.networkingRouterRouteV2Id("string")
.region("string")
.build());
networking_router_route_v2_resource = opentelekomcloud.NetworkingRouterRouteV2("networkingRouterRouteV2Resource",
destination_cidr="string",
next_hop="string",
router_id="string",
networking_router_route_v2_id="string",
region="string")
const networkingRouterRouteV2Resource = new opentelekomcloud.NetworkingRouterRouteV2("networkingRouterRouteV2Resource", {
destinationCidr: "string",
nextHop: "string",
routerId: "string",
networkingRouterRouteV2Id: "string",
region: "string",
});
type: opentelekomcloud:NetworkingRouterRouteV2
properties:
destinationCidr: string
networkingRouterRouteV2Id: string
nextHop: string
region: string
routerId: string
NetworkingRouterRouteV2 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 NetworkingRouterRouteV2 resource accepts the following input properties:
- Destination
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- Next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- Router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- Networking
Router stringRoute V2Id - Region string
- Destination
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- Next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- Router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- Networking
Router stringRoute V2Id - Region string
- destination
Cidr String - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- next
Hop String - IP address of the next hop gateway. Changing this creates a new routing entry.
- router
Id String - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- networking
Router StringRoute V2Id - region String
- destination
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- networking
Router stringRoute V2Id - region string
- destination_
cidr str - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- next_
hop str - IP address of the next hop gateway. Changing this creates a new routing entry.
- router_
id str - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- networking_
router_ strroute_ v2_ id - region str
- destination
Cidr String - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- next
Hop String - IP address of the next hop gateway. Changing this creates a new routing entry.
- router
Id String - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- networking
Router StringRoute V2Id - region String
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingRouterRouteV2 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 NetworkingRouterRouteV2 Resource
Get an existing NetworkingRouterRouteV2 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?: NetworkingRouterRouteV2State, opts?: CustomResourceOptions): NetworkingRouterRouteV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination_cidr: Optional[str] = None,
networking_router_route_v2_id: Optional[str] = None,
next_hop: Optional[str] = None,
region: Optional[str] = None,
router_id: Optional[str] = None) -> NetworkingRouterRouteV2
func GetNetworkingRouterRouteV2(ctx *Context, name string, id IDInput, state *NetworkingRouterRouteV2State, opts ...ResourceOption) (*NetworkingRouterRouteV2, error)
public static NetworkingRouterRouteV2 Get(string name, Input<string> id, NetworkingRouterRouteV2State? state, CustomResourceOptions? opts = null)
public static NetworkingRouterRouteV2 get(String name, Output<String> id, NetworkingRouterRouteV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:NetworkingRouterRouteV2 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
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- Networking
Router stringRoute V2Id - Next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- Region string
- Router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- Destination
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- Networking
Router stringRoute V2Id - Next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- Region string
- Router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- destination
Cidr String - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- networking
Router StringRoute V2Id - next
Hop String - IP address of the next hop gateway. Changing this creates a new routing entry.
- region String
- router
Id String - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- destination
Cidr string - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- networking
Router stringRoute V2Id - next
Hop string - IP address of the next hop gateway. Changing this creates a new routing entry.
- region string
- router
Id string - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- destination_
cidr str - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- networking_
router_ strroute_ v2_ id - next_
hop str - IP address of the next hop gateway. Changing this creates a new routing entry.
- region str
- router_
id str - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
- destination
Cidr String - CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
- networking
Router StringRoute V2Id - next
Hop String - IP address of the next hop gateway. Changing this creates a new routing entry.
- region String
- router
Id String - ID of the router this routing entry belongs to. Changing this creates a new routing entry.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.