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",
});
import pulumi
import pulumi_vkcs as vkcs
app = vkcs.NetworkingSubnet("app",
network_id=vkcs_networking_network["app"]["id"],
cidr="192.168.199.0/24")
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
})
}
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",
});
});
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());
}
}
resources:
app:
type: vkcs:NetworkingSubnet
properties:
networkId: ${vkcs_networking_network.app.id}
cidr: 192.168.199.0/24
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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args NetworkingSubnetArgs
- 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 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 string
- The unique name of the resource.
- args NetworkingSubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingSubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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" },
},
});
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"),
},
})
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());
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",
})
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",
},
});
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
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:
- Network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools List<NetworkingSubnet Allocation Pool> - 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. Theallocation_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.
- Dns
Nameservers 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.
- 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 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.
- Networking
Subnet stringId - 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 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.
- Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- List<string>
- optional set of string → A set of string tags for the subnet.
- Timeouts
Networking
Subnet Timeouts - Value
Specs Dictionary<string, string> - optional map of string → Map of additional options.
- Network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools []NetworkingSubnet Allocation Pool Args - 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. Theallocation_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.
- Dns
Nameservers []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.
- 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 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.
- Networking
Subnet stringId - 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 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.
- Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- []string
- optional set of string → A set of string tags for the subnet.
- Timeouts
Networking
Subnet Timeouts Args - Value
Specs map[string]string - optional map of string → Map of additional options.
- network
Id String - required string → The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools List<NetworkingSubnet Allocation Pool> - 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- networking
Subnet StringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts - value
Specs Map<String,String> - optional map of string → Map of additional options.
- network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools NetworkingSubnet Allocation Pool[] - 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- networking
Subnet stringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- string[]
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts - value
Specs {[key: string]: string} - optional map of string → Map of additional options.
- network_
id str - required string → The UUID of the parent network. Changing this creates a new subnet.
- allocation_
pools Sequence[NetworkingSubnet Allocation Pool Args] - 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. Theallocation_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_ strid - 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.
- Sequence[str]
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts Args - value_
specs Mapping[str, str] - optional map of string → Map of additional options.
- network
Id String - required string → The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- networking
Subnet StringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → A set of string tags for the subnet.
- timeouts Property Map
- value
Specs 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:
- 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.
- []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.
- 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.
- 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.
- 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.
- 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
- 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.
- List<string>
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- Allocation
Pools List<NetworkingSubnet Allocation Pool> - 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. Theallocation_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.
- Dns
Nameservers 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.
- 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 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.
- Network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- Networking
Subnet stringId - 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 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.
- Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- List<string>
- optional set of string → A set of string tags for the subnet.
- Timeouts
Networking
Subnet Timeouts - Value
Specs Dictionary<string, string> - optional map of string → Map of additional options.
- []string
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- Allocation
Pools []NetworkingSubnet Allocation Pool Args - 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. Theallocation_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.
- Dns
Nameservers []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.
- 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 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.
- Network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- Networking
Subnet stringId - 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 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.
- Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- []string
- optional set of string → A set of string tags for the subnet.
- Timeouts
Networking
Subnet Timeouts Args - Value
Specs map[string]string - optional map of string → Map of additional options.
- List<String>
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation
Pools List<NetworkingSubnet Allocation Pool> - 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- network
Id String - required string → The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet StringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts - value
Specs Map<String,String> - optional map of string → Map of additional options.
- string[]
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation
Pools NetworkingSubnet Allocation Pool[] - 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- network
Id string - required string → The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet stringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- string[]
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts - value
Specs {[key: string]: string} - optional map of string → Map of additional options.
- Sequence[str]
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation_
pools Sequence[NetworkingSubnet Allocation Pool Args] - 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. Theallocation_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_ strid - 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.
- Sequence[str]
- optional set of string → A set of string tags for the subnet.
- timeouts
Networking
Subnet Timeouts Args - value_
specs Mapping[str, str] - optional map of string → Map of additional options.
- List<String>
- set of string → The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation
Pools 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. Theallocation_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.
- dns
Nameservers 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.
- enable
Dhcp 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.
- gateway
Ip 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.
- network
Id String - required string → The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet StringId - string → ID of the resource.
- no
Gateway 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.
- prefix
Length 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.
- subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → A set of string tags for the subnet.
- timeouts Property Map
- value
Specs Map<String> - optional map of string → Map of additional options.
Supporting Types
NetworkingSubnetAllocationPool, NetworkingSubnetAllocationPoolArgs
NetworkingSubnetTimeouts, NetworkingSubnetTimeoutsArgs
Import
Subnets can be imported using the id
, e.g.
$ pulumi import vkcs:index/networkingSubnet:NetworkingSubnet subnet_1 da4faf16-5546-41e4-8330-4d0002b74048
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.