1. Packages
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. getDedicatedPrivateSubnetV1
Viewing docs for selectel 8.0.1
published on Thursday, May 28, 2026 by selectel
Viewing docs for selectel 8.0.1
published on Thursday, May 28, 2026 by selectel

    Provides a list of existing private subnets in a project. For more information about private subnets for dedicated servers, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const subnetDs = selectel.getDedicatedPrivateSubnetV1({
        projectId: project1.id,
        filter: {
            locationId: serverLocation.locations[0].id,
            vlan: "1000",
            subnet: "192.168.100.0/24",
        },
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    subnet_ds = selectel.get_dedicated_private_subnet_v1(project_id=project1["id"],
        filter={
            "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.LookupDedicatedPrivateSubnetV1(ctx, &selectel.LookupDedicatedPrivateSubnetV1Args{
    			ProjectId: project1.Id,
    			Filter: selectel.GetDedicatedPrivateSubnetV1Filter{
    				LocationId: pulumi.StringRef(serverLocation.Locations[0].Id),
    				Vlan:       pulumi.StringRef("1000"),
    				Subnet:     pulumi.StringRef("192.168.100.0/24"),
    			},
    		}, nil)
    		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 subnetDs = Selectel.GetDedicatedPrivateSubnetV1.Invoke(new()
        {
            ProjectId = project1.Id,
            Filter = new Selectel.Inputs.GetDedicatedPrivateSubnetV1FilterInputArgs
            {
                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.SelectelFunctions;
    import com.pulumi.selectel.inputs.GetDedicatedPrivateSubnetV1Args;
    import com.pulumi.selectel.inputs.GetDedicatedPrivateSubnetV1FilterArgs;
    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) {
            final var subnetDs = SelectelFunctions.getDedicatedPrivateSubnetV1(GetDedicatedPrivateSubnetV1Args.builder()
                .projectId(project1.id())
                .filter(GetDedicatedPrivateSubnetV1FilterArgs.builder()
                    .locationId(serverLocation.locations()[0].id())
                    .vlan("1000")
                    .subnet("192.168.100.0/24")
                    .build())
                .build());
    
        }
    }
    
    variables:
      subnetDs:
        fn::invoke:
          function: selectel:getDedicatedPrivateSubnetV1
          arguments:
            projectId: ${project1.id}
            filter:
              locationId: ${serverLocation.locations[0].id}
              vlan: '1000'
              subnet: 192.168.100.0/24
    
    Example coming soon!
    

    Using getDedicatedPrivateSubnetV1

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDedicatedPrivateSubnetV1(args: GetDedicatedPrivateSubnetV1Args, opts?: InvokeOptions): Promise<GetDedicatedPrivateSubnetV1Result>
    function getDedicatedPrivateSubnetV1Output(args: GetDedicatedPrivateSubnetV1OutputArgs, opts?: InvokeOptions): Output<GetDedicatedPrivateSubnetV1Result>
    def get_dedicated_private_subnet_v1(filter: Optional[GetDedicatedPrivateSubnetV1Filter] = None,
                                        id: Optional[str] = None,
                                        project_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetDedicatedPrivateSubnetV1Result
    def get_dedicated_private_subnet_v1_output(filter: pulumi.Input[Optional[GetDedicatedPrivateSubnetV1FilterArgs]] = None,
                                        id: pulumi.Input[Optional[str]] = None,
                                        project_id: pulumi.Input[Optional[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedPrivateSubnetV1Result]
    func LookupDedicatedPrivateSubnetV1(ctx *Context, args *LookupDedicatedPrivateSubnetV1Args, opts ...InvokeOption) (*LookupDedicatedPrivateSubnetV1Result, error)
    func LookupDedicatedPrivateSubnetV1Output(ctx *Context, args *LookupDedicatedPrivateSubnetV1OutputArgs, opts ...InvokeOption) LookupDedicatedPrivateSubnetV1ResultOutput

    > Note: This function is named LookupDedicatedPrivateSubnetV1 in the Go SDK.

    public static class GetDedicatedPrivateSubnetV1 
    {
        public static Task<GetDedicatedPrivateSubnetV1Result> InvokeAsync(GetDedicatedPrivateSubnetV1Args args, InvokeOptions? opts = null)
        public static Output<GetDedicatedPrivateSubnetV1Result> Invoke(GetDedicatedPrivateSubnetV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDedicatedPrivateSubnetV1Result> getDedicatedPrivateSubnetV1(GetDedicatedPrivateSubnetV1Args args, InvokeOptions options)
    public static Output<GetDedicatedPrivateSubnetV1Result> getDedicatedPrivateSubnetV1(GetDedicatedPrivateSubnetV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: selectel:index/getDedicatedPrivateSubnetV1:getDedicatedPrivateSubnetV1
      arguments:
        # arguments dictionary
    data "selectel_getdedicatedprivatesubnetv1" "name" {
        # arguments
    }

    The following arguments are supported:

    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Filter GetDedicatedPrivateSubnetV1Filter
    Filter for searching subnets.
    Id string
    Unique identifier of the subnet (UUID).
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Filter GetDedicatedPrivateSubnetV1Filter
    Filter for searching subnets.
    Id string
    Unique identifier of the subnet (UUID).
    project_id string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    filter object
    Filter for searching subnets.
    id string
    Unique identifier of the subnet (UUID).
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    filter GetDedicatedPrivateSubnetV1Filter
    Filter for searching subnets.
    id String
    Unique identifier of the subnet (UUID).
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    filter GetDedicatedPrivateSubnetV1Filter
    Filter for searching subnets.
    id string
    Unique identifier of the subnet (UUID).
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    filter GetDedicatedPrivateSubnetV1Filter
    Filter for searching subnets.
    id str
    Unique identifier of the subnet (UUID).
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    filter Property Map
    Filter for searching subnets.
    id String
    Unique identifier of the subnet (UUID).

    getDedicatedPrivateSubnetV1 Result

    The following output properties are available:

    Id string
    Unique identifier of the subnet (UUID).
    ProjectId string
    Subnets List<GetDedicatedPrivateSubnetV1Subnet>
    List of available subnets:
    Filter GetDedicatedPrivateSubnetV1Filter
    Id string
    Unique identifier of the subnet (UUID).
    ProjectId string
    Subnets []GetDedicatedPrivateSubnetV1Subnet
    List of available subnets:
    Filter GetDedicatedPrivateSubnetV1Filter
    id string
    Unique identifier of the subnet (UUID).
    project_id string
    subnets list(object)
    List of available subnets:
    filter object
    id String
    Unique identifier of the subnet (UUID).
    projectId String
    subnets List<GetDedicatedPrivateSubnetV1Subnet>
    List of available subnets:
    filter GetDedicatedPrivateSubnetV1Filter
    id string
    Unique identifier of the subnet (UUID).
    projectId string
    subnets GetDedicatedPrivateSubnetV1Subnet[]
    List of available subnets:
    filter GetDedicatedPrivateSubnetV1Filter
    id str
    Unique identifier of the subnet (UUID).
    project_id str
    subnets Sequence[GetDedicatedPrivateSubnetV1Subnet]
    List of available subnets:
    filter GetDedicatedPrivateSubnetV1Filter
    id String
    Unique identifier of the subnet (UUID).
    projectId String
    subnets List<Property Map>
    List of available subnets:
    filter Property Map

    Supporting Types

    GetDedicatedPrivateSubnetV1Filter

    Ip string
    IP address belonging to the subnet.
    LocationId string
    Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
    Subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    Vlan string
    Unique identifier of VLAN.
    Ip string
    IP address belonging to the subnet.
    LocationId string
    Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
    Subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    Vlan string
    Unique identifier of VLAN.
    ip string
    IP address belonging to the subnet.
    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 in CIDR notation, for example, 192.168.100.0/24.
    vlan string
    Unique identifier of VLAN.
    ip String
    IP address belonging to the subnet.
    locationId String
    Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
    subnet String
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan String
    Unique identifier of VLAN.
    ip string
    IP address belonging to the subnet.
    locationId string
    Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
    subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan string
    Unique identifier of VLAN.
    ip str
    IP address belonging to the subnet.
    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 in CIDR notation, for example, 192.168.100.0/24.
    vlan str
    Unique identifier of VLAN.
    ip String
    IP address belonging to the subnet.
    locationId String
    Unique identifier of the location where the private subnet will be created. Retrieved from the dedicated_location_v1 data source.
    subnet String
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan String
    Unique identifier of VLAN.

    GetDedicatedPrivateSubnetV1Subnet

    Id string
    Unique identifier of the subnet (UUID).
    ReservedIps List<string>
    List of reserved IP addresses in the subnet that you cannot use.
    Subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    Vlan string
    Unique identifier of the VLAN.
    Id string
    Unique identifier of the subnet (UUID).
    ReservedIps []string
    List of reserved IP addresses in the subnet that you cannot use.
    Subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    Vlan string
    Unique identifier of the VLAN.
    id string
    Unique identifier of the subnet (UUID).
    reserved_ips list(string)
    List of reserved IP addresses in the subnet that you cannot use.
    subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan string
    Unique identifier of the VLAN.
    id String
    Unique identifier of the subnet (UUID).
    reservedIps List<String>
    List of reserved IP addresses in the subnet that you cannot use.
    subnet String
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan String
    Unique identifier of the VLAN.
    id string
    Unique identifier of the subnet (UUID).
    reservedIps string[]
    List of reserved IP addresses in the subnet that you cannot use.
    subnet string
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan string
    Unique identifier of the VLAN.
    id str
    Unique identifier of the subnet (UUID).
    reserved_ips Sequence[str]
    List of reserved IP addresses in the subnet that you cannot use.
    subnet str
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan str
    Unique identifier of the VLAN.
    id String
    Unique identifier of the subnet (UUID).
    reservedIps List<String>
    List of reserved IP addresses in the subnet that you cannot use.
    subnet String
    Subnet in CIDR notation, for example, 192.168.100.0/24.
    vlan String
    Unique identifier of the VLAN.

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    Viewing docs for selectel 8.0.1
    published on Thursday, May 28, 2026 by selectel

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial