published on Thursday, May 28, 2026 by selectel
published on Thursday, May 28, 2026 by selectel
Creates and manages a private subnet for dedicated servers using public API v1. Learn how to assign a private IP address to a dedicated server.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
const subnet1 = new selectel.DedicatedPrivateSubnetV1("subnet_1", {
locationId: serverLocation.locations[0].id,
vlan: "1000",
subnet: "192.168.100.0/24",
});
import pulumi
import pulumi_selectel as selectel
subnet1 = selectel.DedicatedPrivateSubnetV1("subnet_1",
location_id=server_location["locations"][0]["id"],
vlan="1000",
subnet="192.168.100.0/24")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v8/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := selectel.NewDedicatedPrivateSubnetV1(ctx, "subnet_1", &selectel.DedicatedPrivateSubnetV1Args{
LocationId: pulumi.Any(serverLocation.Locations[0].Id),
Vlan: pulumi.String("1000"),
Subnet: pulumi.String("192.168.100.0/24"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;
return await Deployment.RunAsync(() =>
{
var subnet1 = new Selectel.DedicatedPrivateSubnetV1("subnet_1", new()
{
LocationId = serverLocation.Locations[0].Id,
Vlan = "1000",
Subnet = "192.168.100.0/24",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.DedicatedPrivateSubnetV1;
import com.pulumi.selectel.DedicatedPrivateSubnetV1Args;
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 subnet1 = new DedicatedPrivateSubnetV1("subnet1", DedicatedPrivateSubnetV1Args.builder()
.locationId(serverLocation.locations()[0].id())
.vlan("1000")
.subnet("192.168.100.0/24")
.build());
}
}
resources:
subnet1:
type: selectel:DedicatedPrivateSubnetV1
name: subnet_1
properties:
locationId: ${serverLocation.locations[0].id}
vlan: '1000'
subnet: 192.168.100.0/24
Example coming soon!
Create DedicatedPrivateSubnetV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DedicatedPrivateSubnetV1(name: string, args: DedicatedPrivateSubnetV1Args, opts?: CustomResourceOptions);@overload
def DedicatedPrivateSubnetV1(resource_name: str,
args: DedicatedPrivateSubnetV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def DedicatedPrivateSubnetV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
location_id: Optional[str] = None,
subnet: Optional[str] = None,
vlan: Optional[str] = None,
timeouts: Optional[DedicatedPrivateSubnetV1TimeoutsArgs] = None)func NewDedicatedPrivateSubnetV1(ctx *Context, name string, args DedicatedPrivateSubnetV1Args, opts ...ResourceOption) (*DedicatedPrivateSubnetV1, error)public DedicatedPrivateSubnetV1(string name, DedicatedPrivateSubnetV1Args args, CustomResourceOptions? opts = null)
public DedicatedPrivateSubnetV1(String name, DedicatedPrivateSubnetV1Args args)
public DedicatedPrivateSubnetV1(String name, DedicatedPrivateSubnetV1Args args, CustomResourceOptions options)
type: selectel:DedicatedPrivateSubnetV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "selectel_dedicatedprivatesubnetv1" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DedicatedPrivateSubnetV1Args
- 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 DedicatedPrivateSubnetV1Args
- 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 DedicatedPrivateSubnetV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DedicatedPrivateSubnetV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DedicatedPrivateSubnetV1Args
- 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 dedicatedPrivateSubnetV1Resource = new Selectel.DedicatedPrivateSubnetV1("dedicatedPrivateSubnetV1Resource", new()
{
LocationId = "string",
Subnet = "string",
Vlan = "string",
Timeouts = new Selectel.Inputs.DedicatedPrivateSubnetV1TimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := selectel.NewDedicatedPrivateSubnetV1(ctx, "dedicatedPrivateSubnetV1Resource", &selectel.DedicatedPrivateSubnetV1Args{
LocationId: pulumi.String("string"),
Subnet: pulumi.String("string"),
Vlan: pulumi.String("string"),
Timeouts: &selectel.DedicatedPrivateSubnetV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
resource "selectel_dedicatedprivatesubnetv1" "dedicatedPrivateSubnetV1Resource" {
location_id = "string"
subnet = "string"
vlan = "string"
timeouts = {
create = "string"
delete = "string"
}
}
var dedicatedPrivateSubnetV1Resource = new DedicatedPrivateSubnetV1("dedicatedPrivateSubnetV1Resource", DedicatedPrivateSubnetV1Args.builder()
.locationId("string")
.subnet("string")
.vlan("string")
.timeouts(DedicatedPrivateSubnetV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
dedicated_private_subnet_v1_resource = selectel.DedicatedPrivateSubnetV1("dedicatedPrivateSubnetV1Resource",
location_id="string",
subnet="string",
vlan="string",
timeouts={
"create": "string",
"delete": "string",
})
const dedicatedPrivateSubnetV1Resource = new selectel.DedicatedPrivateSubnetV1("dedicatedPrivateSubnetV1Resource", {
locationId: "string",
subnet: "string",
vlan: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: selectel:DedicatedPrivateSubnetV1
properties:
locationId: string
subnet: string
timeouts:
create: string
delete: string
vlan: string
DedicatedPrivateSubnetV1 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 DedicatedPrivateSubnetV1 resource accepts the following input properties:
- Location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- Subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- Vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- Timeouts
Dedicated
Private Subnet V1Timeouts
- Location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- Subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- Vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- Timeouts
Dedicated
Private Subnet V1Timeouts Args
- location_
id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- timeouts object
- location
Id String - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet String
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- vlan String
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- timeouts
Dedicated
Private Subnet V1Timeouts
- location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- timeouts
Dedicated
Private Subnet V1Timeouts
- location_
id str - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet str
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- vlan str
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- timeouts
Dedicated
Private Subnet V1Timeouts Args
- location
Id String - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet String
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- vlan String
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the DedicatedPrivateSubnetV1 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DedicatedPrivateSubnetV1 Resource
Get an existing DedicatedPrivateSubnetV1 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?: DedicatedPrivateSubnetV1State, opts?: CustomResourceOptions): DedicatedPrivateSubnetV1@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
location_id: Optional[str] = None,
subnet: Optional[str] = None,
timeouts: Optional[DedicatedPrivateSubnetV1TimeoutsArgs] = None,
vlan: Optional[str] = None) -> DedicatedPrivateSubnetV1func GetDedicatedPrivateSubnetV1(ctx *Context, name string, id IDInput, state *DedicatedPrivateSubnetV1State, opts ...ResourceOption) (*DedicatedPrivateSubnetV1, error)public static DedicatedPrivateSubnetV1 Get(string name, Input<string> id, DedicatedPrivateSubnetV1State? state, CustomResourceOptions? opts = null)public static DedicatedPrivateSubnetV1 get(String name, Output<String> id, DedicatedPrivateSubnetV1State state, CustomResourceOptions options)resources: _: type: selectel:DedicatedPrivateSubnetV1 get: id: ${id}import {
to = selectel_dedicatedprivatesubnetv1.example
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.
- Location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- Subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- Timeouts
Dedicated
Private Subnet V1Timeouts - Vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- Location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- Subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- Timeouts
Dedicated
Private Subnet V1Timeouts Args - Vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- location_
id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- timeouts object
- vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- location
Id String - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet String
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- timeouts
Dedicated
Private Subnet V1Timeouts - vlan String
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- location
Id string - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet string
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- timeouts
Dedicated
Private Subnet V1Timeouts - vlan string
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- location_
id str - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet str
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- timeouts
Dedicated
Private Subnet V1Timeouts Args - vlan str
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
- location
Id String - Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
- subnet String
- subnet — (Required) CIDR block for the private subnet. Must be within private IP ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. Lern more about Private networks and subnets of the dedicated server.
- timeouts Property Map
- vlan String
- Unique identifier of the VLAN for the private subnet. To get the unique identifier of the VLAN, in the Control panel, go to Products ⟶ Dedicated Servers ⟶ Servers ⟶ servers page ⟶ in the Private block, select a private subnet → copy the ID in the VLAN field.
Supporting Types
DedicatedPrivateSubnetV1Timeouts, DedicatedPrivateSubnetV1TimeoutsArgs
Import
You can import a private subnet:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=
export OS_PASSWORD=
export INFRA_PROJECT_ID=<selectel_project_id>
$ pulumi import selectel:index/dedicatedPrivateSubnetV1:DedicatedPrivateSubnetV1 subnet_1 <subnet_id>
where:
<account_id>— Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.<username>— Name of the service user. To get the name, in the Control panel, go to Identity & Access Management ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.<password>— Password of the service user.<selectel_project_id>— Unique identifier of the associated project. To get the ID, in the Control panel, go to Servers and colocation ⟶ project name ⟶ copy the ID of the required project. Learn more about Projects.<subnet_id>— Unique identifier of the private subnet.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectelTerraform Provider.
published on Thursday, May 28, 2026 by selectel