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

vkcs.NetworkingSubnet

Explore with Pulumi AI

Manages a subnet resource within VKCS.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";

const app = new vkcs.NetworkingSubnet("app", {
    networkId: vkcs_networking_network.app.id,
    cidr: "192.168.199.0/24",
});
Copy
import pulumi
import pulumi_vkcs as vkcs

app = vkcs.NetworkingSubnet("app",
    network_id=vkcs_networking_network["app"]["id"],
    cidr="192.168.199.0/24")
Copy
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.NewNetworkingSubnet(ctx, "app", &vkcs.NetworkingSubnetArgs{
			NetworkId: pulumi.Any(vkcs_networking_network.App.Id),
			Cidr:      pulumi.String("192.168.199.0/24"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var app = new Vkcs.NetworkingSubnet("app", new()
    {
        NetworkId = vkcs_networking_network.App.Id,
        Cidr = "192.168.199.0/24",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.NetworkingSubnet;
import com.pulumi.vkcs.NetworkingSubnetArgs;
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 app = new NetworkingSubnet("app", NetworkingSubnetArgs.builder()
            .networkId(vkcs_networking_network.app().id())
            .cidr("192.168.199.0/24")
            .build());

    }
}
Copy
resources:
  app:
    type: vkcs:NetworkingSubnet
    properties:
      networkId: ${vkcs_networking_network.app.id}
      cidr: 192.168.199.0/24
Copy

Subnet with not default DNS servers

import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";

const subnetWithDnsTfExample = new vkcs.NetworkingSubnet("subnetWithDnsTfExample", {
    networkId: vkcs_networking_network.app.id,
    dnsNameservers: [
        "8.8.8.8",
        "8.8.4.4",
    ],
    cidr: "192.168.200.0/24",
});
Copy
import pulumi
import pulumi_vkcs as vkcs

subnet_with_dns_tf_example = vkcs.NetworkingSubnet("subnetWithDnsTfExample",
    network_id=vkcs_networking_network["app"]["id"],
    dns_nameservers=[
        "8.8.8.8",
        "8.8.4.4",
    ],
    cidr="192.168.200.0/24")
Copy
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.NewNetworkingSubnet(ctx, "subnetWithDnsTfExample", &vkcs.NetworkingSubnetArgs{
			NetworkId: pulumi.Any(vkcs_networking_network.App.Id),
			DnsNameservers: pulumi.StringArray{
				pulumi.String("8.8.8.8"),
				pulumi.String("8.8.4.4"),
			},
			Cidr: pulumi.String("192.168.200.0/24"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var subnetWithDnsTfExample = new Vkcs.NetworkingSubnet("subnetWithDnsTfExample", new()
    {
        NetworkId = vkcs_networking_network.App.Id,
        DnsNameservers = new[]
        {
            "8.8.8.8",
            "8.8.4.4",
        },
        Cidr = "192.168.200.0/24",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.NetworkingSubnet;
import com.pulumi.vkcs.NetworkingSubnetArgs;
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 subnetWithDnsTfExample = new NetworkingSubnet("subnetWithDnsTfExample", NetworkingSubnetArgs.builder()
            .networkId(vkcs_networking_network.app().id())
            .dnsNameservers(            
                "8.8.8.8",
                "8.8.4.4")
            .cidr("192.168.200.0/24")
            .build());

    }
}
Copy
resources:
  subnetWithDnsTfExample:
    type: vkcs:NetworkingSubnet
    properties:
      networkId: ${vkcs_networking_network.app.id}
      # here we set DNS'es instead of built in ones.
      #   # subnet resources will not be available via their private DNS names.
      dnsNameservers:
        - 8.8.8.8
        - 8.8.4.4
      cidr: 192.168.200.0/24
Copy

Create NetworkingSubnet Resource

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

Constructor syntax

new NetworkingSubnet(name: string, args: NetworkingSubnetArgs, opts?: CustomResourceOptions);
@overload
def NetworkingSubnet(resource_name: str,
                     args: NetworkingSubnetArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def NetworkingSubnet(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     network_id: Optional[str] = None,
                     networking_subnet_id: Optional[str] = None,
                     prefix_length: Optional[float] = None,
                     dns_nameservers: Optional[Sequence[str]] = None,
                     enable_dhcp: Optional[bool] = None,
                     gateway_ip: Optional[str] = None,
                     name: Optional[str] = None,
                     description: Optional[str] = None,
                     cidr: Optional[str] = None,
                     no_gateway: Optional[bool] = None,
                     allocation_pools: Optional[Sequence[NetworkingSubnetAllocationPoolArgs]] = None,
                     region: Optional[str] = None,
                     sdn: Optional[str] = None,
                     subnetpool_id: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None,
                     timeouts: Optional[NetworkingSubnetTimeoutsArgs] = None,
                     value_specs: Optional[Mapping[str, str]] = None)
func NewNetworkingSubnet(ctx *Context, name string, args NetworkingSubnetArgs, opts ...ResourceOption) (*NetworkingSubnet, error)
public NetworkingSubnet(string name, NetworkingSubnetArgs args, CustomResourceOptions? opts = null)
public NetworkingSubnet(String name, NetworkingSubnetArgs args)
public NetworkingSubnet(String name, NetworkingSubnetArgs args, CustomResourceOptions options)
type: vkcs:NetworkingSubnet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NetworkingSubnetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NetworkingSubnetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingSubnetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingSubnetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkingSubnetArgs
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 networkingSubnetResource = new Vkcs.NetworkingSubnet("networkingSubnetResource", new()
{
    NetworkId = "string",
    NetworkingSubnetId = "string",
    PrefixLength = 0,
    DnsNameservers = new[]
    {
        "string",
    },
    EnableDhcp = false,
    GatewayIp = "string",
    Name = "string",
    Description = "string",
    Cidr = "string",
    NoGateway = false,
    AllocationPools = new[]
    {
        new Vkcs.Inputs.NetworkingSubnetAllocationPoolArgs
        {
            End = "string",
            Start = "string",
        },
    },
    Region = "string",
    Sdn = "string",
    SubnetpoolId = "string",
    Tags = new[]
    {
        "string",
    },
    Timeouts = new Vkcs.Inputs.NetworkingSubnetTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    ValueSpecs = 
    {
        { "string", "string" },
    },
});
Copy
example, err := vkcs.NewNetworkingSubnet(ctx, "networkingSubnetResource", &vkcs.NetworkingSubnetArgs{
	NetworkId:          pulumi.String("string"),
	NetworkingSubnetId: pulumi.String("string"),
	PrefixLength:       pulumi.Float64(0),
	DnsNameservers: pulumi.StringArray{
		pulumi.String("string"),
	},
	EnableDhcp:  pulumi.Bool(false),
	GatewayIp:   pulumi.String("string"),
	Name:        pulumi.String("string"),
	Description: pulumi.String("string"),
	Cidr:        pulumi.String("string"),
	NoGateway:   pulumi.Bool(false),
	AllocationPools: vkcs.NetworkingSubnetAllocationPoolArray{
		&vkcs.NetworkingSubnetAllocationPoolArgs{
			End:   pulumi.String("string"),
			Start: pulumi.String("string"),
		},
	},
	Region:       pulumi.String("string"),
	Sdn:          pulumi.String("string"),
	SubnetpoolId: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Timeouts: &vkcs.NetworkingSubnetTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
	},
	ValueSpecs: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var networkingSubnetResource = new NetworkingSubnet("networkingSubnetResource", NetworkingSubnetArgs.builder()
    .networkId("string")
    .networkingSubnetId("string")
    .prefixLength(0)
    .dnsNameservers("string")
    .enableDhcp(false)
    .gatewayIp("string")
    .name("string")
    .description("string")
    .cidr("string")
    .noGateway(false)
    .allocationPools(NetworkingSubnetAllocationPoolArgs.builder()
        .end("string")
        .start("string")
        .build())
    .region("string")
    .sdn("string")
    .subnetpoolId("string")
    .tags("string")
    .timeouts(NetworkingSubnetTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .valueSpecs(Map.of("string", "string"))
    .build());
Copy
networking_subnet_resource = vkcs.NetworkingSubnet("networkingSubnetResource",
    network_id="string",
    networking_subnet_id="string",
    prefix_length=0,
    dns_nameservers=["string"],
    enable_dhcp=False,
    gateway_ip="string",
    name="string",
    description="string",
    cidr="string",
    no_gateway=False,
    allocation_pools=[{
        "end": "string",
        "start": "string",
    }],
    region="string",
    sdn="string",
    subnetpool_id="string",
    tags=["string"],
    timeouts={
        "create": "string",
        "delete": "string",
    },
    value_specs={
        "string": "string",
    })
Copy
const networkingSubnetResource = new vkcs.NetworkingSubnet("networkingSubnetResource", {
    networkId: "string",
    networkingSubnetId: "string",
    prefixLength: 0,
    dnsNameservers: ["string"],
    enableDhcp: false,
    gatewayIp: "string",
    name: "string",
    description: "string",
    cidr: "string",
    noGateway: false,
    allocationPools: [{
        end: "string",
        start: "string",
    }],
    region: "string",
    sdn: "string",
    subnetpoolId: "string",
    tags: ["string"],
    timeouts: {
        create: "string",
        "delete": "string",
    },
    valueSpecs: {
        string: "string",
    },
});
Copy
type: vkcs:NetworkingSubnet
properties:
    allocationPools:
        - end: string
          start: string
    cidr: string
    description: string
    dnsNameservers:
        - string
    enableDhcp: false
    gatewayIp: string
    name: string
    networkId: string
    networkingSubnetId: string
    noGateway: false
    prefixLength: 0
    region: string
    sdn: string
    subnetpoolId: string
    tags:
        - string
    timeouts:
        create: string
        delete: string
    valueSpecs:
        string: string
Copy

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

NetworkId This property is required. string
required string → The UUID of the parent network. Changing this creates a new subnet.
AllocationPools List<NetworkingSubnetAllocationPool>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
Cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
Description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
DnsNameservers List<string>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
EnableDhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
GatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
Name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
NetworkingSubnetId string
string → ID of the resource.
NoGateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
PrefixLength double
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
Region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SubnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
Tags List<string>
optional set of string → A set of string tags for the subnet.
Timeouts NetworkingSubnetTimeouts
ValueSpecs Dictionary<string, string>
optional map of string → Map of additional options.
NetworkId This property is required. string
required string → The UUID of the parent network. Changing this creates a new subnet.
AllocationPools []NetworkingSubnetAllocationPoolArgs
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
Cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
Description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
DnsNameservers []string
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
EnableDhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
GatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
Name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
NetworkingSubnetId string
string → ID of the resource.
NoGateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
PrefixLength float64
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
Region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SubnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
Tags []string
optional set of string → A set of string tags for the subnet.
Timeouts NetworkingSubnetTimeoutsArgs
ValueSpecs map[string]string
optional map of string → Map of additional options.
networkId This property is required. String
required string → The UUID of the parent network. Changing this creates a new subnet.
allocationPools List<NetworkingSubnetAllocationPool>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr String
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description String
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers List<String>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp Boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp String
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name String
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkingSubnetId String
string → ID of the resource.
noGateway Boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength Double
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region String
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId String
optional string → The ID of the subnetpool associated with the subnet.
tags List<String>
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeouts
valueSpecs Map<String,String>
optional map of string → Map of additional options.
networkId This property is required. string
required string → The UUID of the parent network. Changing this creates a new subnet.
allocationPools NetworkingSubnetAllocationPool[]
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers string[]
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkingSubnetId string
string → ID of the resource.
noGateway boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength number
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
tags string[]
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeouts
valueSpecs {[key: string]: string}
optional map of string → Map of additional options.
network_id This property is required. str
required string → The UUID of the parent network. Changing this creates a new subnet.
allocation_pools Sequence[NetworkingSubnetAllocationPoolArgs]
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr str
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description str
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dns_nameservers Sequence[str]
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enable_dhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gateway_ip str
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name str
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networking_subnet_id str
string → ID of the resource.
no_gateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefix_length float
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region str
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn str
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpool_id str
optional string → The ID of the subnetpool associated with the subnet.
tags Sequence[str]
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeoutsArgs
value_specs Mapping[str, str]
optional map of string → Map of additional options.
networkId This property is required. String
required string → The UUID of the parent network. Changing this creates a new subnet.
allocationPools List<Property Map>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr String
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description String
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers List<String>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp Boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp String
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name String
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkingSubnetId String
string → ID of the resource.
noGateway Boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength Number
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region String
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId String
optional string → The ID of the subnetpool associated with the subnet.
tags List<String>
optional set of string → A set of string tags for the subnet.
timeouts Property Map
valueSpecs Map<String>
optional map of string → Map of additional options.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkingSubnet resource produces the following output properties:

AllTags List<string>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
Id string
The provider-assigned unique ID for this managed resource.
AllTags []string
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
Id string
The provider-assigned unique ID for this managed resource.
allTags List<String>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
id String
The provider-assigned unique ID for this managed resource.
allTags string[]
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
id string
The provider-assigned unique ID for this managed resource.
all_tags Sequence[str]
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
id str
The provider-assigned unique ID for this managed resource.
allTags List<String>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing NetworkingSubnet Resource

Get an existing NetworkingSubnet 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?: NetworkingSubnetState, opts?: CustomResourceOptions): NetworkingSubnet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        all_tags: Optional[Sequence[str]] = None,
        allocation_pools: Optional[Sequence[NetworkingSubnetAllocationPoolArgs]] = None,
        cidr: Optional[str] = None,
        description: Optional[str] = None,
        dns_nameservers: Optional[Sequence[str]] = None,
        enable_dhcp: Optional[bool] = None,
        gateway_ip: Optional[str] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        networking_subnet_id: Optional[str] = None,
        no_gateway: Optional[bool] = None,
        prefix_length: Optional[float] = None,
        region: Optional[str] = None,
        sdn: Optional[str] = None,
        subnetpool_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        timeouts: Optional[NetworkingSubnetTimeoutsArgs] = None,
        value_specs: Optional[Mapping[str, str]] = None) -> NetworkingSubnet
func GetNetworkingSubnet(ctx *Context, name string, id IDInput, state *NetworkingSubnetState, opts ...ResourceOption) (*NetworkingSubnet, error)
public static NetworkingSubnet Get(string name, Input<string> id, NetworkingSubnetState? state, CustomResourceOptions? opts = null)
public static NetworkingSubnet get(String name, Output<String> id, NetworkingSubnetState state, CustomResourceOptions options)
resources:  _:    type: vkcs:NetworkingSubnet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllTags List<string>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
AllocationPools List<NetworkingSubnetAllocationPool>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
Cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
Description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
DnsNameservers List<string>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
EnableDhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
GatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
Name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
NetworkId string
required string → The UUID of the parent network. Changing this creates a new subnet.
NetworkingSubnetId string
string → ID of the resource.
NoGateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
PrefixLength double
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
Region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SubnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
Tags List<string>
optional set of string → A set of string tags for the subnet.
Timeouts NetworkingSubnetTimeouts
ValueSpecs Dictionary<string, string>
optional map of string → Map of additional options.
AllTags []string
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
AllocationPools []NetworkingSubnetAllocationPoolArgs
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
Cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
Description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
DnsNameservers []string
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
EnableDhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
GatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
Name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
NetworkId string
required string → The UUID of the parent network. Changing this creates a new subnet.
NetworkingSubnetId string
string → ID of the resource.
NoGateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
PrefixLength float64
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
Region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SubnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
Tags []string
optional set of string → A set of string tags for the subnet.
Timeouts NetworkingSubnetTimeoutsArgs
ValueSpecs map[string]string
optional map of string → Map of additional options.
allTags List<String>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
allocationPools List<NetworkingSubnetAllocationPool>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr String
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description String
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers List<String>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp Boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp String
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name String
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkId String
required string → The UUID of the parent network. Changing this creates a new subnet.
networkingSubnetId String
string → ID of the resource.
noGateway Boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength Double
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region String
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId String
optional string → The ID of the subnetpool associated with the subnet.
tags List<String>
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeouts
valueSpecs Map<String,String>
optional map of string → Map of additional options.
allTags string[]
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
allocationPools NetworkingSubnetAllocationPool[]
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr string
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description string
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers string[]
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp string
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name string
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkId string
required string → The UUID of the parent network. Changing this creates a new subnet.
networkingSubnetId string
string → ID of the resource.
noGateway boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength number
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region string
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId string
optional string → The ID of the subnetpool associated with the subnet.
tags string[]
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeouts
valueSpecs {[key: string]: string}
optional map of string → Map of additional options.
all_tags Sequence[str]
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
allocation_pools Sequence[NetworkingSubnetAllocationPoolArgs]
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr str
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description str
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dns_nameservers Sequence[str]
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enable_dhcp bool
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gateway_ip str
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name str
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
network_id str
required string → The UUID of the parent network. Changing this creates a new subnet.
networking_subnet_id str
string → ID of the resource.
no_gateway bool
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefix_length float
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region str
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn str
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpool_id str
optional string → The ID of the subnetpool associated with the subnet.
tags Sequence[str]
optional set of string → A set of string tags for the subnet.
timeouts NetworkingSubnetTimeoutsArgs
value_specs Mapping[str, str]
optional map of string → Map of additional options.
allTags List<String>
set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
allocationPools List<Property Map>
optional → A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.
cidr String
optional string → CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
description String
optional string → Human-readable description of the subnet. Changing this updates the name of the existing subnet.
dnsNameservers List<String>
optional string → An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.
enableDhcp Boolean
optional boolean → The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
gatewayIp String
optional string → Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default value. For the Sprut SDN, this field cannot be changed after creation.
name String
optional string → The name of the subnet. Changing this updates the name of the existing subnet.
networkId String
required string → The UUID of the parent network. Changing this creates a new subnet.
networkingSubnetId String
string → ID of the resource.
noGateway Boolean
optional boolean → Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
prefixLength Number
optional number → The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
region String
optional string → The region in which to obtain the Networking client. A Networking client is needed to create a subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
subnetpoolId String
optional string → The ID of the subnetpool associated with the subnet.
tags List<String>
optional set of string → A set of string tags for the subnet.
timeouts Property Map
valueSpecs Map<String>
optional map of string → Map of additional options.

Supporting Types

NetworkingSubnetAllocationPool
, NetworkingSubnetAllocationPoolArgs

End This property is required. string
required string → The ending address.
Start This property is required. string
required string → The starting address.
End This property is required. string
required string → The ending address.
Start This property is required. string
required string → The starting address.
end This property is required. String
required string → The ending address.
start This property is required. String
required string → The starting address.
end This property is required. string
required string → The ending address.
start This property is required. string
required string → The starting address.
end This property is required. str
required string → The ending address.
start This property is required. str
required string → The starting address.
end This property is required. String
required string → The ending address.
start This property is required. String
required string → The starting address.

NetworkingSubnetTimeouts
, NetworkingSubnetTimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

Subnets can be imported using the id, e.g.

$ pulumi import vkcs:index/networkingSubnet:NetworkingSubnet subnet_1 da4faf16-5546-41e4-8330-4d0002b74048
Copy

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.