Show / Hide Table of Contents

Class RouterRoute

Creates a routing entry on a OpenStack V2 router.

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,
    });
}

}

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.

Inheritance
System.Object
Resource
CustomResource
RouterRoute
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.Networking
Assembly: Pulumi.OpenStack.dll
Syntax
public class RouterRoute : CustomResource

Constructors

View Source

RouterRoute(String, RouterRouteArgs, CustomResourceOptions)

Create a RouterRoute resource with the given unique name, arguments, and options.

Declaration
public RouterRoute(string name, RouterRouteArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RouterRouteArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

DestinationCidr

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

Declaration
public Output<string> DestinationCidr { get; }
Property Value
Type Description
Output<System.String>
View Source

NextHop

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

Declaration
public Output<string> NextHop { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

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.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

RouterId

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

Declaration
public Output<string> RouterId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RouterRouteState, CustomResourceOptions)

Get an existing RouterRoute resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static RouterRoute Get(string name, Input<string> id, RouterRouteState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RouterRouteState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RouterRoute
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.