opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud
opentelekomcloud.getVpcSubnetIdsV1
Start a Neo task
Explain and create an opentelekomcloud.getVpcSubnetIdsV1 resource
opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud
Up-to-date reference of API arguments for VPC subnet you can get at documentation portal
Use this data source to get a list of subnet ids for a vpc_id This resource can be useful for getting back a list of subnet ids for a VPC.
Example Usage
The following example shows outputting all cidr blocks for every subnet id in a VPC.
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const subnetIds = opentelekomcloud.getVpcSubnetIdsV1({
vpcId: vpcId,
});
const subnet = subnetIds.then(subnetIds => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: opentelekomcloud.getVpcSubnetV1({
id: __value,
}) })));
export const subnetCidrBlocks = subnet.apply(subnet => Object.values(subnet).map(s => (s.cidr)));
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
subnet_ids = opentelekomcloud.get_vpc_subnet_ids_v1(vpc_id=vpc_id)
subnet = {__key: opentelekomcloud.get_vpc_subnet_v1(id=__value) for __key, __value in subnet_ids.ids}
pulumi.export("subnetCidrBlocks", [s.cidr for s in subnet])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var subnetIds = Opentelekomcloud.GetVpcSubnetIdsV1.Invoke(new()
{
VpcId = vpcId,
});
var subnet = ;
return new Dictionary<string, object?>
{
["subnetCidrBlocks"] = subnet.Apply(subnet => (subnet).Values.Select(s =>
{
return s.Cidr;
}).ToList()),
};
});
Example coming soon!
Example coming soon!
Using getVpcSubnetIdsV1
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 getVpcSubnetIdsV1(args: GetVpcSubnetIdsV1Args, opts?: InvokeOptions): Promise<GetVpcSubnetIdsV1Result>
function getVpcSubnetIdsV1Output(args: GetVpcSubnetIdsV1OutputArgs, opts?: InvokeOptions): Output<GetVpcSubnetIdsV1Result>def get_vpc_subnet_ids_v1(id: Optional[str] = None,
region: Optional[str] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcSubnetIdsV1Result
def get_vpc_subnet_ids_v1_output(id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcSubnetIdsV1Result]func GetVpcSubnetIdsV1(ctx *Context, args *GetVpcSubnetIdsV1Args, opts ...InvokeOption) (*GetVpcSubnetIdsV1Result, error)
func GetVpcSubnetIdsV1Output(ctx *Context, args *GetVpcSubnetIdsV1OutputArgs, opts ...InvokeOption) GetVpcSubnetIdsV1ResultOutput> Note: This function is named GetVpcSubnetIdsV1 in the Go SDK.
public static class GetVpcSubnetIdsV1
{
public static Task<GetVpcSubnetIdsV1Result> InvokeAsync(GetVpcSubnetIdsV1Args args, InvokeOptions? opts = null)
public static Output<GetVpcSubnetIdsV1Result> Invoke(GetVpcSubnetIdsV1InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVpcSubnetIdsV1Result> getVpcSubnetIdsV1(GetVpcSubnetIdsV1Args args, InvokeOptions options)
public static Output<GetVpcSubnetIdsV1Result> getVpcSubnetIdsV1(GetVpcSubnetIdsV1Args args, InvokeOptions options)
fn::invoke:
function: opentelekomcloud:index/getVpcSubnetIdsV1:getVpcSubnetIdsV1
arguments:
# arguments dictionaryThe following arguments are supported:
getVpcSubnetIdsV1 Result
The following output properties are available:
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloudTerraform Provider.
opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud
