1. Packages
  2. Vkcs Provider
  3. API Docs
  4. NetworkingRouterRoute
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.NetworkingRouterRoute

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Creates a routing entry on a VKCS router.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const computeGateway = new vkcs.NetworkingRouterRoute("computeGateway", {
        routerId: vkcs_networking_router.router.id,
        destinationCidr: "10.10.0.0/23",
        nextHop: vkcs_compute_instance.gateway.access_ip_v4,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    compute_gateway = vkcs.NetworkingRouterRoute("computeGateway",
        router_id=vkcs_networking_router["router"]["id"],
        destination_cidr="10.10.0.0/23",
        next_hop=vkcs_compute_instance["gateway"]["access_ip_v4"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingRouterRoute(ctx, "computeGateway", &vkcs.NetworkingRouterRouteArgs{
    			RouterId:        pulumi.Any(vkcs_networking_router.Router.Id),
    			DestinationCidr: pulumi.String("10.10.0.0/23"),
    			NextHop:         pulumi.Any(vkcs_compute_instance.Gateway.Access_ip_v4),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var computeGateway = new Vkcs.NetworkingRouterRoute("computeGateway", new()
        {
            RouterId = vkcs_networking_router.Router.Id,
            DestinationCidr = "10.10.0.0/23",
            NextHop = vkcs_compute_instance.Gateway.Access_ip_v4,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingRouterRoute;
    import com.pulumi.vkcs.NetworkingRouterRouteArgs;
    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 computeGateway = new NetworkingRouterRoute("computeGateway", NetworkingRouterRouteArgs.builder()
                .routerId(vkcs_networking_router.router().id())
                .destinationCidr("10.10.0.0/23")
                .nextHop(vkcs_compute_instance.gateway().access_ip_v4())
                .build());
    
        }
    }
    
    resources:
      computeGateway:
        type: vkcs:NetworkingRouterRoute
        properties:
          routerId: ${vkcs_networking_router.router.id}
          destinationCidr: 10.10.0.0/23
          nextHop: ${vkcs_compute_instance.gateway.access_ip_v4}
    

    Notes

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

    Create NetworkingRouterRoute Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkingRouterRoute(name: string, args: NetworkingRouterRouteArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkingRouterRoute(resource_name: str,
                              args: NetworkingRouterRouteArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingRouterRoute(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_id: Optional[str] = None,
                              region: Optional[str] = None,
                              sdn: Optional[str] = None)
    func NewNetworkingRouterRoute(ctx *Context, name string, args NetworkingRouterRouteArgs, opts ...ResourceOption) (*NetworkingRouterRoute, error)
    public NetworkingRouterRoute(string name, NetworkingRouterRouteArgs args, CustomResourceOptions? opts = null)
    public NetworkingRouterRoute(String name, NetworkingRouterRouteArgs args)
    public NetworkingRouterRoute(String name, NetworkingRouterRouteArgs args, CustomResourceOptions options)
    
    type: vkcs:NetworkingRouterRoute
    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 NetworkingRouterRouteArgs
    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 NetworkingRouterRouteArgs
    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 NetworkingRouterRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingRouterRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingRouterRouteArgs
    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 networkingRouterRouteResource = new Vkcs.NetworkingRouterRoute("networkingRouterRouteResource", new()
    {
        DestinationCidr = "string",
        NextHop = "string",
        RouterId = "string",
        NetworkingRouterRouteId = "string",
        Region = "string",
        Sdn = "string",
    });
    
    example, err := vkcs.NewNetworkingRouterRoute(ctx, "networkingRouterRouteResource", &vkcs.NetworkingRouterRouteArgs{
    	DestinationCidr:         pulumi.String("string"),
    	NextHop:                 pulumi.String("string"),
    	RouterId:                pulumi.String("string"),
    	NetworkingRouterRouteId: pulumi.String("string"),
    	Region:                  pulumi.String("string"),
    	Sdn:                     pulumi.String("string"),
    })
    
    var networkingRouterRouteResource = new NetworkingRouterRoute("networkingRouterRouteResource", NetworkingRouterRouteArgs.builder()
        .destinationCidr("string")
        .nextHop("string")
        .routerId("string")
        .networkingRouterRouteId("string")
        .region("string")
        .sdn("string")
        .build());
    
    networking_router_route_resource = vkcs.NetworkingRouterRoute("networkingRouterRouteResource",
        destination_cidr="string",
        next_hop="string",
        router_id="string",
        networking_router_route_id="string",
        region="string",
        sdn="string")
    
    const networkingRouterRouteResource = new vkcs.NetworkingRouterRoute("networkingRouterRouteResource", {
        destinationCidr: "string",
        nextHop: "string",
        routerId: "string",
        networkingRouterRouteId: "string",
        region: "string",
        sdn: "string",
    });
    
    type: vkcs:NetworkingRouterRoute
    properties:
        destinationCidr: string
        networkingRouterRouteId: string
        nextHop: string
        region: string
        routerId: string
        sdn: string
    

    NetworkingRouterRoute 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 NetworkingRouterRoute resource accepts the following input properties:

    DestinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    NextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    RouterId string
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    NetworkingRouterRouteId string
    string → ID of the resource.
    Region string
    optional string → The region in which to obtain the 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.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    DestinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    NextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    RouterId string
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    NetworkingRouterRouteId string
    string → ID of the resource.
    Region string
    optional string → The region in which to obtain the 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.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    nextHop String
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    routerId String
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    networkingRouterRouteId String
    string → ID of the resource.
    region String
    optional string → The region in which to obtain the 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.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    nextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    routerId string
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    networkingRouterRouteId string
    string → ID of the resource.
    region string
    optional string → The region in which to obtain the 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.
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destination_cidr str
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    next_hop str
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    router_id str
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    networking_router_route_id str
    string → ID of the resource.
    region str
    optional string → The region in which to obtain the 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.
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    nextHop String
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    routerId String
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    networkingRouterRouteId String
    string → ID of the resource.
    region String
    optional string → The region in which to obtain the 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.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkingRouterRoute 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 NetworkingRouterRoute Resource

    Get an existing NetworkingRouterRoute 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?: NetworkingRouterRouteState, opts?: CustomResourceOptions): NetworkingRouterRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destination_cidr: Optional[str] = None,
            networking_router_route_id: Optional[str] = None,
            next_hop: Optional[str] = None,
            region: Optional[str] = None,
            router_id: Optional[str] = None,
            sdn: Optional[str] = None) -> NetworkingRouterRoute
    func GetNetworkingRouterRoute(ctx *Context, name string, id IDInput, state *NetworkingRouterRouteState, opts ...ResourceOption) (*NetworkingRouterRoute, error)
    public static NetworkingRouterRoute Get(string name, Input<string> id, NetworkingRouterRouteState? state, CustomResourceOptions? opts = null)
    public static NetworkingRouterRoute get(String name, Output<String> id, NetworkingRouterRouteState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:NetworkingRouterRoute    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.
    The following state arguments are supported:
    DestinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    NetworkingRouterRouteId string
    string → ID of the resource.
    NextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    Region string
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    DestinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    NetworkingRouterRouteId string
    string → ID of the resource.
    NextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    Region string
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingRouterRouteId String
    string → ID of the resource.
    nextHop String
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    region String
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingRouterRouteId string
    string → ID of the resource.
    nextHop string
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    region string
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destination_cidr str
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networking_router_route_id str
    string → ID of the resource.
    next_hop str
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    region str
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingRouterRouteId String
    string → ID of the resource.
    nextHop String
    required string → IP address of the next hop gateway. Changing this creates a new routing entry.
    region String
    optional string → The region in which to obtain the 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
    required string → ID of the router this routing entry belongs to. Changing this creates a new routing entry.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.

    Import

    Routing entries can be imported using a combined ID using the following format: <router_id>-route-<destination_cidr>-<next_hop>0

    $ pulumi import vkcs:index/networkingRouterRoute:NetworkingRouterRoute router_route_1 686fe248-386c-4f70-9f6c-281607dad079-route-10.0.1.0/24-192.168.199.25
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs