RouterRoute

Creates a routing entry on a OpenStack V2 router.

Notes

The next_hop IP address must be directly reachable from the router at the openstack.networking.RouterRoute resource creation time. You can ensure that by explicitly specifying a dependency on the openstack.networking.RouterInterface resource that connects the next hop to the router, as in the example above.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var router1 = new OpenStack.Networking.Router("router1", new OpenStack.Networking.RouterArgs
        {
            AdminStateUp = true,
        });
        var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
        {
            AdminStateUp = true,
        });
        var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
        {
            Cidr = "192.168.199.0/24",
            IpVersion = 4,
            NetworkId = network1.Id,
        });
        var int1 = new OpenStack.Networking.RouterInterface("int1", new OpenStack.Networking.RouterInterfaceArgs
        {
            RouterId = router1.Id,
            SubnetId = subnet1.Id,
        });
        var routerRoute1 = new OpenStack.Networking.RouterRoute("routerRoute1", new OpenStack.Networking.RouterRouteArgs
        {
            DestinationCidr = "10.0.1.0/24",
            NextHop = "192.168.199.254",
            RouterId = router1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

router1 = openstack.networking.Router("router1", admin_state_up="true")
network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
    cidr="192.168.199.0/24",
    ip_version=4,
    network_id=network1.id)
int1 = openstack.networking.RouterInterface("int1",
    router_id=router1.id,
    subnet_id=subnet1.id)
router_route1 = openstack.networking.RouterRoute("routerRoute1",
    destination_cidr="10.0.1.0/24",
    next_hop="192.168.199.254",
    router_id=router1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const router1 = new openstack.networking.Router("router_1", {
    adminStateUp: true,
});
const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    cidr: "192.168.199.0/24",
    ipVersion: 4,
    networkId: network1.id,
});
const int1 = new openstack.networking.RouterInterface("int_1", {
    routerId: router1.id,
    subnetId: subnet1.id,
});
const routerRoute1 = new openstack.networking.RouterRoute("router_route_1", {
    destinationCidr: "10.0.1.0/24",
    nextHop: "192.168.199.254",
    routerId: router1.id,
}, { dependsOn: [int1] });

Create a RouterRoute Resource

def RouterRoute(resource_name, opts=None, destination_cidr=None, next_hop=None, region=None, router_id=None, __props__=None);
func NewRouterRoute(ctx *Context, name string, args RouterRouteArgs, opts ...ResourceOption) (*RouterRoute, error)
public RouterRoute(string name, RouterRouteArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RouterRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RouterRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RouterRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RouterRoute Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The RouterRoute resource accepts the following input properties:

DestinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

NextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

RouterId string

ID of the router this routing entry belongs to. Changing this creates a new routing entry.

Region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

DestinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

NextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

RouterId string

ID of the router this routing entry belongs to. Changing this creates a new routing entry.

Region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

destinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

nextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

routerId string

ID of the router this routing entry belongs to. Changing this creates a new routing entry.

region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. 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.

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.

region str

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

Outputs

All input properties are implicitly available as output properties. Additionally, the RouterRoute 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing RouterRoute Resource

Get an existing RouterRoute 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?: RouterRouteState, opts?: CustomResourceOptions): RouterRoute
static get(resource_name, id, opts=None, destination_cidr=None, next_hop=None, region=None, router_id=None, __props__=None);
func GetRouterRoute(ctx *Context, name string, id IDInput, state *RouterRouteState, opts ...ResourceOption) (*RouterRoute, error)
public static RouterRoute Get(string name, Input<string> id, RouterRouteState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

DestinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

NextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

Region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

RouterId string

ID of the router this routing entry belongs to. Changing this creates a new routing entry.

DestinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

NextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

Region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

RouterId string

ID of the router this routing entry belongs to. Changing this creates a new routing entry.

destinationCidr string

CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.

nextHop string

IP address of the next hop gateway. Changing this creates a new routing entry.

region string

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. Changing this creates a new routing entry.

routerId 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.

next_hop str

IP address of the next hop gateway. Changing this creates a new routing entry.

region str

The region in which to obtain the V2 networking client. A networking client is needed to configure a routing entry on a router. If omitted, the region argument of the provider is used. 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.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.