selectel 7.0.2-preview published on Wednesday, Oct 8, 2025 by selectel
selectel.getDedicatedPublicSubnetV1
selectel 7.0.2-preview published on Wednesday, Oct 8, 2025 by selectel
Provides a list of available public subnets.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
const serverLocation = selectel.getDedicatedLocationV1({
projectId: selectel_vpc_project_v2.project_1.id,
filter: {
name: "some-subnet",
},
});
const publicSubnets = serverLocation.then(serverLocation => selectel.getDedicatedPublicSubnetV1({
projectId: selectel_vpc_project_v2.project_1.id,
filter: {
locationId: serverLocation.locations?.[0]?.id,
subnet: "192.168.1.0/29",
ip: "192.168.1.3",
},
}));
import pulumi
import pulumi_selectel as selectel
server_location = selectel.get_dedicated_location_v1(project_id=selectel_vpc_project_v2["project_1"]["id"],
filter={
"name": "some-subnet",
})
public_subnets = selectel.get_dedicated_public_subnet_v1(project_id=selectel_vpc_project_v2["project_1"]["id"],
filter={
"location_id": server_location.locations[0].id,
"subnet": "192.168.1.0/29",
"ip": "192.168.1.3",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v7/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
serverLocation, err := selectel.GetDedicatedLocationV1(ctx, &selectel.GetDedicatedLocationV1Args{
ProjectId: selectel_vpc_project_v2.Project_1.Id,
Filter: selectel.GetDedicatedLocationV1Filter{
Name: pulumi.StringRef("some-subnet"),
},
}, nil)
if err != nil {
return err
}
_, err = selectel.GetDedicatedPublicSubnetV1(ctx, &selectel.GetDedicatedPublicSubnetV1Args{
ProjectId: selectel_vpc_project_v2.Project_1.Id,
Filter: selectel.GetDedicatedPublicSubnetV1Filter{
LocationId: pulumi.StringRef(serverLocation.Locations[0].Id),
Subnet: pulumi.StringRef("192.168.1.0/29"),
Ip: pulumi.StringRef("192.168.1.3"),
},
}, 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 serverLocation = Selectel.GetDedicatedLocationV1.Invoke(new()
{
ProjectId = selectel_vpc_project_v2.Project_1.Id,
Filter = new Selectel.Inputs.GetDedicatedLocationV1FilterInputArgs
{
Name = "some-subnet",
},
});
var publicSubnets = Selectel.GetDedicatedPublicSubnetV1.Invoke(new()
{
ProjectId = selectel_vpc_project_v2.Project_1.Id,
Filter = new Selectel.Inputs.GetDedicatedPublicSubnetV1FilterInputArgs
{
LocationId = serverLocation.Apply(getDedicatedLocationV1Result => getDedicatedLocationV1Result.Locations[0]?.Id),
Subnet = "192.168.1.0/29",
Ip = "192.168.1.3",
},
});
});
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.GetDedicatedLocationV1Args;
import com.pulumi.selectel.inputs.GetDedicatedLocationV1FilterArgs;
import com.pulumi.selectel.inputs.GetDedicatedPublicSubnetV1Args;
import com.pulumi.selectel.inputs.GetDedicatedPublicSubnetV1FilterArgs;
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 serverLocation = SelectelFunctions.getDedicatedLocationV1(GetDedicatedLocationV1Args.builder()
.projectId(selectel_vpc_project_v2.project_1().id())
.filter(GetDedicatedLocationV1FilterArgs.builder()
.name("some-subnet")
.build())
.build());
final var publicSubnets = SelectelFunctions.getDedicatedPublicSubnetV1(GetDedicatedPublicSubnetV1Args.builder()
.projectId(selectel_vpc_project_v2.project_1().id())
.filter(GetDedicatedPublicSubnetV1FilterArgs.builder()
.locationId(serverLocation.applyValue(getDedicatedLocationV1Result -> getDedicatedLocationV1Result.locations()[0].id()))
.subnet("192.168.1.0/29")
.ip("192.168.1.3")
.build())
.build());
}
}
variables:
serverLocation:
fn::invoke:
function: selectel:getDedicatedLocationV1
arguments:
projectId: ${selectel_vpc_project_v2.project_1.id}
filter:
name: some-subnet
publicSubnets:
fn::invoke:
function: selectel:getDedicatedPublicSubnetV1
arguments:
projectId: ${selectel_vpc_project_v2.project_1.id}
filter:
locationId: ${serverLocation.locations[0].id}
subnet: 192.168.1.0/29
ip: 192.168.1.3
Using getDedicatedPublicSubnetV1
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 getDedicatedPublicSubnetV1(args: GetDedicatedPublicSubnetV1Args, opts?: InvokeOptions): Promise<GetDedicatedPublicSubnetV1Result>
function getDedicatedPublicSubnetV1Output(args: GetDedicatedPublicSubnetV1OutputArgs, opts?: InvokeOptions): Output<GetDedicatedPublicSubnetV1Result>
def get_dedicated_public_subnet_v1(filter: Optional[GetDedicatedPublicSubnetV1Filter] = None,
id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDedicatedPublicSubnetV1Result
def get_dedicated_public_subnet_v1_output(filter: Optional[pulumi.Input[GetDedicatedPublicSubnetV1FilterArgs]] = None,
id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedPublicSubnetV1Result]
func GetDedicatedPublicSubnetV1(ctx *Context, args *GetDedicatedPublicSubnetV1Args, opts ...InvokeOption) (*GetDedicatedPublicSubnetV1Result, error)
func GetDedicatedPublicSubnetV1Output(ctx *Context, args *GetDedicatedPublicSubnetV1OutputArgs, opts ...InvokeOption) GetDedicatedPublicSubnetV1ResultOutput
> Note: This function is named GetDedicatedPublicSubnetV1
in the Go SDK.
public static class GetDedicatedPublicSubnetV1
{
public static Task<GetDedicatedPublicSubnetV1Result> InvokeAsync(GetDedicatedPublicSubnetV1Args args, InvokeOptions? opts = null)
public static Output<GetDedicatedPublicSubnetV1Result> Invoke(GetDedicatedPublicSubnetV1InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDedicatedPublicSubnetV1Result> getDedicatedPublicSubnetV1(GetDedicatedPublicSubnetV1Args args, InvokeOptions options)
public static Output<GetDedicatedPublicSubnetV1Result> getDedicatedPublicSubnetV1(GetDedicatedPublicSubnetV1Args args, InvokeOptions options)
fn::invoke:
function: selectel:index/getDedicatedPublicSubnetV1:getDedicatedPublicSubnetV1
arguments:
# arguments dictionary
The following arguments are supported:
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Filter
Get
Dedicated Public Subnet V1Filter - Values to filter available subnets.
- Id string
- Unique identifier of the subnet.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Filter
Get
Dedicated Public Subnet V1Filter - Values to filter available subnets.
- Id string
- Unique identifier of the subnet.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- filter
Get
Dedicated Public Subnet V1Filter - Values to filter available subnets.
- id String
- Unique identifier of the subnet.
- project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- filter
Get
Dedicated Public Subnet V1Filter - Values to filter available subnets.
- id string
- Unique identifier of the subnet.
- project_
id str - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- filter
Get
Dedicated Public Subnet V1Filter - Values to filter available subnets.
- id str
- Unique identifier of the subnet.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- filter Property Map
- Values to filter available subnets.
- id String
- Unique identifier of the subnet.
getDedicatedPublicSubnetV1 Result
The following output properties are available:
- Id string
- Unique identifier of the subnet.
- Project
Id string - Subnets
List<Get
Dedicated Public Subnet V1Subnet> - List of the available subnets:
- Filter
Get
Dedicated Public Subnet V1Filter
- Id string
- Unique identifier of the subnet.
- Project
Id string - Subnets
[]Get
Dedicated Public Subnet V1Subnet - List of the available subnets:
- Filter
Get
Dedicated Public Subnet V1Filter
- id String
- Unique identifier of the subnet.
- project
Id String - subnets
List<Get
Dedicated Public Subnet V1Subnet> - List of the available subnets:
- filter
Get
Dedicated Public Subnet V1Filter
- id string
- Unique identifier of the subnet.
- project
Id string - subnets
Get
Dedicated Public Subnet V1Subnet[] - List of the available subnets:
- filter
Get
Dedicated Public Subnet V1Filter
- id str
- Unique identifier of the subnet.
- project_
id str - subnets
Sequence[Get
Dedicated Public Subnet V1Subnet] - List of the available subnets:
- filter
Get
Dedicated Public Subnet V1Filter
- id String
- Unique identifier of the subnet.
- project
Id String - subnets List<Property Map>
- List of the available subnets:
- filter Property Map
Supporting Types
GetDedicatedPublicSubnetV1Filter
- Ip string
- IP address to search included in a subnet.
- Location
Id string - Unique identifier of the location.
- Subnet string
- Subnet in CIDR notation to search.
- Ip string
- IP address to search included in a subnet.
- Location
Id string - Unique identifier of the location.
- Subnet string
- Subnet in CIDR notation to search.
- ip String
- IP address to search included in a subnet.
- location
Id String - Unique identifier of the location.
- subnet String
- Subnet in CIDR notation to search.
- ip string
- IP address to search included in a subnet.
- location
Id string - Unique identifier of the location.
- subnet string
- Subnet in CIDR notation to search.
- ip str
- IP address to search included in a subnet.
- location_
id str - Unique identifier of the location.
- subnet str
- Subnet in CIDR notation to search.
- ip String
- IP address to search included in a subnet.
- location
Id String - Unique identifier of the location.
- subnet String
- Subnet in CIDR notation to search.
GetDedicatedPublicSubnetV1Subnet
- broadcast str
- Broadcast address.
- gateway str
- Gateway address.
- id str
- Unique identifier of the subnet.
- network_
id str - Unique identifier of the network.
- reserved_
vrrp_ Sequence[str]ips - List of reserved VRRP IPs.
- subnet str
- Subnet in CIDR notation.
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectel
Terraform Provider.
selectel 7.0.2-preview published on Wednesday, Oct 8, 2025 by selectel