vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getNetworkingSubnet
Explore with Pulumi AI
Use this data source to get the ID of an available VKCS subnet.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const subnetOneOfInternal = vkcs.getNetworkingSubnet({
cidr: "192.168.199.0/24",
networkId: vkcs_networking_network.app.id,
});
import pulumi
import pulumi_vkcs as vkcs
subnet_one_of_internal = vkcs.get_networking_subnet(cidr="192.168.199.0/24",
network_id=vkcs_networking_network["app"]["id"])
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.LookupNetworkingSubnet(ctx, &vkcs.LookupNetworkingSubnetArgs{
Cidr: pulumi.StringRef("192.168.199.0/24"),
NetworkId: pulumi.StringRef(vkcs_networking_network.App.Id),
}, nil)
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 subnetOneOfInternal = Vkcs.GetNetworkingSubnet.Invoke(new()
{
Cidr = "192.168.199.0/24",
NetworkId = vkcs_networking_network.App.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetNetworkingSubnetArgs;
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 subnetOneOfInternal = VkcsFunctions.getNetworkingSubnet(GetNetworkingSubnetArgs.builder()
.cidr("192.168.199.0/24")
.networkId(vkcs_networking_network.app().id())
.build());
}
}
variables:
subnetOneOfInternal:
fn::invoke:
function: vkcs:getNetworkingSubnet
arguments:
cidr: 192.168.199.0/24
networkId: ${vkcs_networking_network.app.id}
Using getNetworkingSubnet
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 getNetworkingSubnet(args: GetNetworkingSubnetArgs, opts?: InvokeOptions): Promise<GetNetworkingSubnetResult>
function getNetworkingSubnetOutput(args: GetNetworkingSubnetOutputArgs, opts?: InvokeOptions): Output<GetNetworkingSubnetResult>
def get_networking_subnet(cidr: Optional[str] = None,
description: Optional[str] = None,
dhcp_enabled: Optional[bool] = None,
gateway_ip: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
region: Optional[str] = None,
sdn: Optional[str] = None,
subnet_id: Optional[str] = None,
subnetpool_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkingSubnetResult
def get_networking_subnet_output(cidr: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dhcp_enabled: Optional[pulumi.Input[bool]] = None,
gateway_ip: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
network_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
sdn: Optional[pulumi.Input[str]] = None,
subnet_id: Optional[pulumi.Input[str]] = None,
subnetpool_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
tenant_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkingSubnetResult]
func LookupNetworkingSubnet(ctx *Context, args *LookupNetworkingSubnetArgs, opts ...InvokeOption) (*LookupNetworkingSubnetResult, error)
func LookupNetworkingSubnetOutput(ctx *Context, args *LookupNetworkingSubnetOutputArgs, opts ...InvokeOption) LookupNetworkingSubnetResultOutput
> Note: This function is named LookupNetworkingSubnet
in the Go SDK.
public static class GetNetworkingSubnet
{
public static Task<GetNetworkingSubnetResult> InvokeAsync(GetNetworkingSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkingSubnetResult> Invoke(GetNetworkingSubnetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkingSubnetResult> getNetworkingSubnet(GetNetworkingSubnetArgs args, InvokeOptions options)
public static Output<GetNetworkingSubnetResult> getNetworkingSubnet(GetNetworkingSubnetArgs args, InvokeOptions options)
fn::invoke:
function: vkcs:index/getNetworkingSubnet:getNetworkingSubnet
arguments:
# arguments dictionary
The following arguments are supported:
- Cidr string
- optional string → The CIDR of the subnet.
- Description string
- optional string → Human-readable description of the subnet.
- Dhcp
Enabled bool - optional boolean → If the subnet has DHCP enabled.
- Gateway
Ip string - optional string → The IP of the subnet's gateway.
- Id string
- optional string → The ID of the subnet.
- Name string
- optional string → The name of the subnet.
- Network
Id string - optional string → The ID of the network the subnet belongs to.
- Region string
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - Sdn string
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- Subnet
Id string - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- List<string>
- optional set of string → The list of subnet tags to filter.
- Tenant
Id string - optional string → The owner of the subnet.
- Cidr string
- optional string → The CIDR of the subnet.
- Description string
- optional string → Human-readable description of the subnet.
- Dhcp
Enabled bool - optional boolean → If the subnet has DHCP enabled.
- Gateway
Ip string - optional string → The IP of the subnet's gateway.
- Id string
- optional string → The ID of the subnet.
- Name string
- optional string → The name of the subnet.
- Network
Id string - optional string → The ID of the network the subnet belongs to.
- Region string
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - Sdn string
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- Subnet
Id string - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - Subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- []string
- optional set of string → The list of subnet tags to filter.
- Tenant
Id string - optional string → The owner of the subnet.
- cidr String
- optional string → The CIDR of the subnet.
- description String
- optional string → Human-readable description of the subnet.
- dhcp
Enabled Boolean - optional boolean → If the subnet has DHCP enabled.
- gateway
Ip String - optional string → The IP of the subnet's gateway.
- id String
- optional string → The ID of the subnet.
- name String
- optional string → The name of the subnet.
- network
Id String - optional string → The ID of the network the subnet belongs to.
- region String
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - sdn String
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- subnet
Id String - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → The list of subnet tags to filter.
- tenant
Id String - optional string → The owner of the subnet.
- cidr string
- optional string → The CIDR of the subnet.
- description string
- optional string → Human-readable description of the subnet.
- dhcp
Enabled boolean - optional boolean → If the subnet has DHCP enabled.
- gateway
Ip string - optional string → The IP of the subnet's gateway.
- id string
- optional string → The ID of the subnet.
- name string
- optional string → The name of the subnet.
- network
Id string - optional string → The ID of the network the subnet belongs to.
- region string
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - sdn string
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- subnet
Id string - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - subnetpool
Id string - optional string → The ID of the subnetpool associated with the subnet.
- string[]
- optional set of string → The list of subnet tags to filter.
- tenant
Id string - optional string → The owner of the subnet.
- cidr str
- optional string → The CIDR of the subnet.
- description str
- optional string → Human-readable description of the subnet.
- dhcp_
enabled bool - optional boolean → If the subnet has DHCP enabled.
- gateway_
ip str - optional string → The IP of the subnet's gateway.
- id str
- optional string → The ID of the subnet.
- name str
- optional string → The name of the subnet.
- network_
id str - optional string → The ID of the network the subnet belongs to.
- region str
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - sdn str
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- subnet_
id str - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - subnetpool_
id str - optional string → The ID of the subnetpool associated with the subnet.
- Sequence[str]
- optional set of string → The list of subnet tags to filter.
- tenant_
id str - optional string → The owner of the subnet.
- cidr String
- optional string → The CIDR of the subnet.
- description String
- optional string → Human-readable description of the subnet.
- dhcp
Enabled Boolean - optional boolean → If the subnet has DHCP enabled.
- gateway
Ip String - optional string → The IP of the subnet's gateway.
- id String
- optional string → The ID of the subnet.
- name String
- optional string → The name of the subnet.
- network
Id String - optional string → The ID of the network the subnet belongs to.
- region String
- optional string → The region in which to obtain the Network client. A Network client is needed to retrieve subnet ids. If omitted, the
region
argument of the provider is used. - sdn String
- optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
- subnet
Id String - optional deprecated string → The ID of the subnet. Deprecated This argument is deprecated, please, use the
id
attribute instead. - subnetpool
Id String - optional string → The ID of the subnetpool associated with the subnet.
- List<String>
- optional set of string → The list of subnet tags to filter.
- tenant
Id String - optional string → The owner of the subnet.
getNetworkingSubnet Result
The following output properties are available:
- List<string>
- set of string → A set of string tags applied on the subnet.
- Allocation
Pools List<GetNetworking Subnet Allocation Pool> - list → Allocation pools of the subnet.
- Cidr string
- Description string
- Dns
Nameservers List<string> - set of string → DNS Nameservers of the subnet.
- Enable
Dhcp bool - boolean → Whether the subnet has DHCP enabled or not.
- Gateway
Ip string - Host
Routes List<GetNetworking Subnet Host Route> - list → Host Routes of the subnet.
- Id string
- Name string
- Network
Id string - Region string
- Sdn string
- Subnet
Id string - Subnetpool
Id string - Tenant
Id string - Dhcp
Enabled bool - List<string>
- []string
- set of string → A set of string tags applied on the subnet.
- Allocation
Pools []GetNetworking Subnet Allocation Pool - list → Allocation pools of the subnet.
- Cidr string
- Description string
- Dns
Nameservers []string - set of string → DNS Nameservers of the subnet.
- Enable
Dhcp bool - boolean → Whether the subnet has DHCP enabled or not.
- Gateway
Ip string - Host
Routes []GetNetworking Subnet Host Route - list → Host Routes of the subnet.
- Id string
- Name string
- Network
Id string - Region string
- Sdn string
- Subnet
Id string - Subnetpool
Id string - Tenant
Id string - Dhcp
Enabled bool - []string
- List<String>
- set of string → A set of string tags applied on the subnet.
- allocation
Pools List<GetNetworking Subnet Allocation Pool> - list → Allocation pools of the subnet.
- cidr String
- description String
- dns
Nameservers List<String> - set of string → DNS Nameservers of the subnet.
- enable
Dhcp Boolean - boolean → Whether the subnet has DHCP enabled or not.
- gateway
Ip String - host
Routes List<GetNetworking Subnet Host Route> - list → Host Routes of the subnet.
- id String
- name String
- network
Id String - region String
- sdn String
- subnet
Id String - subnetpool
Id String - tenant
Id String - dhcp
Enabled Boolean - List<String>
- string[]
- set of string → A set of string tags applied on the subnet.
- allocation
Pools GetNetworking Subnet Allocation Pool[] - list → Allocation pools of the subnet.
- cidr string
- description string
- dns
Nameservers string[] - set of string → DNS Nameservers of the subnet.
- enable
Dhcp boolean - boolean → Whether the subnet has DHCP enabled or not.
- gateway
Ip string - host
Routes GetNetworking Subnet Host Route[] - list → Host Routes of the subnet.
- id string
- name string
- network
Id string - region string
- sdn string
- subnet
Id string - subnetpool
Id string - tenant
Id string - dhcp
Enabled boolean - string[]
- Sequence[str]
- set of string → A set of string tags applied on the subnet.
- allocation_
pools Sequence[GetNetworking Subnet Allocation Pool] - list → Allocation pools of the subnet.
- cidr str
- description str
- dns_
nameservers Sequence[str] - set of string → DNS Nameservers of the subnet.
- enable_
dhcp bool - boolean → Whether the subnet has DHCP enabled or not.
- gateway_
ip str - host_
routes Sequence[GetNetworking Subnet Host Route] - list → Host Routes of the subnet.
- id str
- name str
- network_
id str - region str
- sdn str
- subnet_
id str - subnetpool_
id str - tenant_
id str - dhcp_
enabled bool - Sequence[str]
- List<String>
- set of string → A set of string tags applied on the subnet.
- allocation
Pools List<Property Map> - list → Allocation pools of the subnet.
- cidr String
- description String
- dns
Nameservers List<String> - set of string → DNS Nameservers of the subnet.
- enable
Dhcp Boolean - boolean → Whether the subnet has DHCP enabled or not.
- gateway
Ip String - host
Routes List<Property Map> - list → Host Routes of the subnet.
- id String
- name String
- network
Id String - region String
- sdn String
- subnet
Id String - subnetpool
Id String - tenant
Id String - dhcp
Enabled Boolean - List<String>
Supporting Types
GetNetworkingSubnetAllocationPool
GetNetworkingSubnetHostRoute
- Destination
Cidr string - string
- Next
Hop string - string
- Destination
Cidr string - string
- Next
Hop string - string
- destination
Cidr String - string
- next
Hop String - string
- destination
Cidr string - string
- next
Hop string - string
- destination_
cidr str - string
- next_
hop str - string
- destination
Cidr String - string
- next
Hop String - string
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.