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

vkcs.NetworkingSubnetRoute

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const subnetRouteToExternalTfExample = new vkcs.NetworkingSubnetRoute("subnetRouteToExternalTfExample", {
        subnetId: vkcs_networking_subnet.app.id,
        destinationCidr: "10.0.1.0/24",
        nextHop: vkcs_networking_port.persistent_etcd.all_fixed_ips[0],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    subnet_route_to_external_tf_example = vkcs.NetworkingSubnetRoute("subnetRouteToExternalTfExample",
        subnet_id=vkcs_networking_subnet["app"]["id"],
        destination_cidr="10.0.1.0/24",
        next_hop=vkcs_networking_port["persistent_etcd"]["all_fixed_ips"])
    
    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.NewNetworkingSubnetRoute(ctx, "subnetRouteToExternalTfExample", &vkcs.NetworkingSubnetRouteArgs{
    			SubnetId:        pulumi.Any(vkcs_networking_subnet.App.Id),
    			DestinationCidr: pulumi.String("10.0.1.0/24"),
    			NextHop:         pulumi.Any(vkcs_networking_port.Persistent_etcd.All_fixed_ips[0]),
    		})
    		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 subnetRouteToExternalTfExample = new Vkcs.NetworkingSubnetRoute("subnetRouteToExternalTfExample", new()
        {
            SubnetId = vkcs_networking_subnet.App.Id,
            DestinationCidr = "10.0.1.0/24",
            NextHop = vkcs_networking_port.Persistent_etcd.All_fixed_ips[0],
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingSubnetRoute;
    import com.pulumi.vkcs.NetworkingSubnetRouteArgs;
    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 subnetRouteToExternalTfExample = new NetworkingSubnetRoute("subnetRouteToExternalTfExample", NetworkingSubnetRouteArgs.builder()
                .subnetId(vkcs_networking_subnet.app().id())
                .destinationCidr("10.0.1.0/24")
                .nextHop(vkcs_networking_port.persistent_etcd().all_fixed_ips()[0])
                .build());
    
        }
    }
    
    resources:
      subnetRouteToExternalTfExample:
        type: vkcs:NetworkingSubnetRoute
        properties:
          subnetId: ${vkcs_networking_subnet.app.id}
          destinationCidr: 10.0.1.0/24
          nextHop: ${vkcs_networking_port.persistent_etcd.all_fixed_ips[0]}
    

    Create NetworkingSubnetRoute Resource

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

    Constructor syntax

    new NetworkingSubnetRoute(name: string, args: NetworkingSubnetRouteArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkingSubnetRoute(resource_name: str,
                              args: NetworkingSubnetRouteArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingSubnetRoute(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              destination_cidr: Optional[str] = None,
                              next_hop: Optional[str] = None,
                              subnet_id: Optional[str] = None,
                              networking_subnet_route_id: Optional[str] = None,
                              region: Optional[str] = None,
                              sdn: Optional[str] = None)
    func NewNetworkingSubnetRoute(ctx *Context, name string, args NetworkingSubnetRouteArgs, opts ...ResourceOption) (*NetworkingSubnetRoute, error)
    public NetworkingSubnetRoute(string name, NetworkingSubnetRouteArgs args, CustomResourceOptions? opts = null)
    public NetworkingSubnetRoute(String name, NetworkingSubnetRouteArgs args)
    public NetworkingSubnetRoute(String name, NetworkingSubnetRouteArgs args, CustomResourceOptions options)
    
    type: vkcs:NetworkingSubnetRoute
    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 NetworkingSubnetRouteArgs
    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 NetworkingSubnetRouteArgs
    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 NetworkingSubnetRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingSubnetRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingSubnetRouteArgs
    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 networkingSubnetRouteResource = new Vkcs.NetworkingSubnetRoute("networkingSubnetRouteResource", new()
    {
        DestinationCidr = "string",
        NextHop = "string",
        SubnetId = "string",
        NetworkingSubnetRouteId = "string",
        Region = "string",
        Sdn = "string",
    });
    
    example, err := vkcs.NewNetworkingSubnetRoute(ctx, "networkingSubnetRouteResource", &vkcs.NetworkingSubnetRouteArgs{
    	DestinationCidr:         pulumi.String("string"),
    	NextHop:                 pulumi.String("string"),
    	SubnetId:                pulumi.String("string"),
    	NetworkingSubnetRouteId: pulumi.String("string"),
    	Region:                  pulumi.String("string"),
    	Sdn:                     pulumi.String("string"),
    })
    
    var networkingSubnetRouteResource = new NetworkingSubnetRoute("networkingSubnetRouteResource", NetworkingSubnetRouteArgs.builder()
        .destinationCidr("string")
        .nextHop("string")
        .subnetId("string")
        .networkingSubnetRouteId("string")
        .region("string")
        .sdn("string")
        .build());
    
    networking_subnet_route_resource = vkcs.NetworkingSubnetRoute("networkingSubnetRouteResource",
        destination_cidr="string",
        next_hop="string",
        subnet_id="string",
        networking_subnet_route_id="string",
        region="string",
        sdn="string")
    
    const networkingSubnetRouteResource = new vkcs.NetworkingSubnetRoute("networkingSubnetRouteResource", {
        destinationCidr: "string",
        nextHop: "string",
        subnetId: "string",
        networkingSubnetRouteId: "string",
        region: "string",
        sdn: "string",
    });
    
    type: vkcs:NetworkingSubnetRoute
    properties:
        destinationCidr: string
        networkingSubnetRouteId: string
        nextHop: string
        region: string
        sdn: string
        subnetId: string
    

    NetworkingSubnetRoute 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 NetworkingSubnetRoute 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.
    SubnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    NetworkingSubnetRouteId 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 subnet. 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.
    SubnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    NetworkingSubnetRouteId 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 subnet. 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.
    subnetId String
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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.
    subnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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.
    subnet_id str
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    networking_subnet_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 subnet. 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.
    subnetId String
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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 NetworkingSubnetRoute 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 NetworkingSubnetRoute Resource

    Get an existing NetworkingSubnetRoute 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?: NetworkingSubnetRouteState, opts?: CustomResourceOptions): NetworkingSubnetRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destination_cidr: Optional[str] = None,
            networking_subnet_route_id: Optional[str] = None,
            next_hop: Optional[str] = None,
            region: Optional[str] = None,
            sdn: Optional[str] = None,
            subnet_id: Optional[str] = None) -> NetworkingSubnetRoute
    func GetNetworkingSubnetRoute(ctx *Context, name string, id IDInput, state *NetworkingSubnetRouteState, opts ...ResourceOption) (*NetworkingSubnetRoute, error)
    public static NetworkingSubnetRoute Get(string name, Input<string> id, NetworkingSubnetRouteState? state, CustomResourceOptions? opts = null)
    public static NetworkingSubnetRoute get(String name, Output<String> id, NetworkingSubnetRouteState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:NetworkingSubnetRoute    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.
    NetworkingSubnetRouteId 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 subnet. 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.
    SubnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    DestinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    NetworkingSubnetRouteId 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 subnet. 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.
    SubnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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.
    subnetId String
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    destinationCidr string
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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.
    subnetId string
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    destination_cidr str
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networking_subnet_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 subnet. 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.
    subnet_id str
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.
    destinationCidr String
    required string → CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
    networkingSubnetRouteId 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 subnet. 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.
    subnetId String
    required string → ID of the subnet this routing entry belongs to. Changing this creates a new routing entry.

    Import

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

    $ pulumi import vkcs:index/networkingSubnetRoute:NetworkingSubnetRoute subnet_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