Viewing docs for gcore 2.0.0-alpha.3
published on Monday, Mar 30, 2026 by g-core
published on Monday, Mar 30, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.3
published on Monday, Mar 30, 2026 by g-core
published on Monday, Mar 30, 2026 by g-core
Subnets define IP address ranges within a network for instance connectivity, with support for DHCP and DNS configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const exampleCloudNetworkSubnet = gcore.getCloudNetworkSubnet({
projectId: 1,
regionId: 1,
subnetId: "b39792c3-3160-4356-912e-ba396c95cdcf",
});
import pulumi
import pulumi_gcore as gcore
example_cloud_network_subnet = gcore.get_cloud_network_subnet(project_id=1,
region_id=1,
subnet_id="b39792c3-3160-4356-912e-ba396c95cdcf")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.LookupCloudNetworkSubnet(ctx, &gcore.LookupCloudNetworkSubnetArgs{
ProjectId: pulumi.Float64Ref(1),
RegionId: pulumi.Float64Ref(1),
SubnetId: pulumi.StringRef("b39792c3-3160-4356-912e-ba396c95cdcf"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var exampleCloudNetworkSubnet = Gcore.GetCloudNetworkSubnet.Invoke(new()
{
ProjectId = 1,
RegionId = 1,
SubnetId = "b39792c3-3160-4356-912e-ba396c95cdcf",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetCloudNetworkSubnetArgs;
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 exampleCloudNetworkSubnet = GcoreFunctions.getCloudNetworkSubnet(GetCloudNetworkSubnetArgs.builder()
.projectId(1)
.regionId(1)
.subnetId("b39792c3-3160-4356-912e-ba396c95cdcf")
.build());
}
}
variables:
exampleCloudNetworkSubnet:
fn::invoke:
function: gcore:getCloudNetworkSubnet
arguments:
projectId: 1
regionId: 1
subnetId: b39792c3-3160-4356-912e-ba396c95cdcf
Using getCloudNetworkSubnet
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 getCloudNetworkSubnet(args: GetCloudNetworkSubnetArgs, opts?: InvokeOptions): Promise<GetCloudNetworkSubnetResult>
function getCloudNetworkSubnetOutput(args: GetCloudNetworkSubnetOutputArgs, opts?: InvokeOptions): Output<GetCloudNetworkSubnetResult>def get_cloud_network_subnet(find_one_by: Optional[GetCloudNetworkSubnetFindOneBy] = None,
project_id: Optional[float] = None,
region_id: Optional[float] = None,
subnet_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudNetworkSubnetResult
def get_cloud_network_subnet_output(find_one_by: Optional[pulumi.Input[GetCloudNetworkSubnetFindOneByArgs]] = None,
project_id: Optional[pulumi.Input[float]] = None,
region_id: Optional[pulumi.Input[float]] = None,
subnet_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudNetworkSubnetResult]func LookupCloudNetworkSubnet(ctx *Context, args *LookupCloudNetworkSubnetArgs, opts ...InvokeOption) (*LookupCloudNetworkSubnetResult, error)
func LookupCloudNetworkSubnetOutput(ctx *Context, args *LookupCloudNetworkSubnetOutputArgs, opts ...InvokeOption) LookupCloudNetworkSubnetResultOutput> Note: This function is named LookupCloudNetworkSubnet in the Go SDK.
public static class GetCloudNetworkSubnet
{
public static Task<GetCloudNetworkSubnetResult> InvokeAsync(GetCloudNetworkSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetCloudNetworkSubnetResult> Invoke(GetCloudNetworkSubnetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudNetworkSubnetResult> getCloudNetworkSubnet(GetCloudNetworkSubnetArgs args, InvokeOptions options)
public static Output<GetCloudNetworkSubnetResult> getCloudNetworkSubnet(GetCloudNetworkSubnetArgs args, InvokeOptions options)
fn::invoke:
function: gcore:index/getCloudNetworkSubnet:getCloudNetworkSubnet
arguments:
# arguments dictionaryThe following arguments are supported:
- Find
One GetBy Cloud Network Subnet Find One By - Project
Id double - Project ID
- Region
Id double - Region ID
- Subnet
Id string - Subnet ID
- Find
One GetBy Cloud Network Subnet Find One By - Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- Subnet
Id string - Subnet ID
- find
One GetBy Cloud Network Subnet Find One By - project
Id Double - Project ID
- region
Id Double - Region ID
- subnet
Id String - Subnet ID
- find
One GetBy Cloud Network Subnet Find One By - project
Id number - Project ID
- region
Id number - Region ID
- subnet
Id string - Subnet ID
- find_
one_ Getby Cloud Network Subnet Find One By - project_
id float - Project ID
- region_
id float - Region ID
- subnet_
id str - Subnet ID
- find
One Property MapBy - project
Id Number - Project ID
- region
Id Number - Region ID
- subnet
Id String - Subnet ID
getCloudNetworkSubnet Result
The following output properties are available:
- Available
Ips double - Number of available ips in subnet
- Cidr string
- CIDR
- Created
At string - Datetime when the subnet was created
- Creator
Task stringId - Task that created this entity
- Dns
Nameservers List<string> - List IP addresses of a DNS resolver reachable from the network
- Enable
Dhcp bool - True if DHCP should be enabled
- Gateway
Ip string - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- Has
Router bool - Deprecated. Always returns
false. - Host
Routes List<GetCloud Network Subnet Host Route> - List of custom static routes to advertise via DHCP.
- Id string
- Subnet ID
- Ip
Version double - IP version Available values: 4, 6.
- Name string
- Subnet name
- Network
Id string - Network ID
- Region string
- Region name
-
List<Get
Cloud Network Subnet Tag> - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Total
Ips double - Total number of ips in subnet
- Updated
At string - Datetime when the subnet was last updated
- Find
One GetBy Cloud Network Subnet Find One By - Project
Id double - Project ID
- Region
Id double - Region ID
- Subnet
Id string - Subnet ID
- Available
Ips float64 - Number of available ips in subnet
- Cidr string
- CIDR
- Created
At string - Datetime when the subnet was created
- Creator
Task stringId - Task that created this entity
- Dns
Nameservers []string - List IP addresses of a DNS resolver reachable from the network
- Enable
Dhcp bool - True if DHCP should be enabled
- Gateway
Ip string - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- Has
Router bool - Deprecated. Always returns
false. - Host
Routes []GetCloud Network Subnet Host Route - List of custom static routes to advertise via DHCP.
- Id string
- Subnet ID
- Ip
Version float64 - IP version Available values: 4, 6.
- Name string
- Subnet name
- Network
Id string - Network ID
- Region string
- Region name
-
[]Get
Cloud Network Subnet Tag - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Total
Ips float64 - Total number of ips in subnet
- Updated
At string - Datetime when the subnet was last updated
- Find
One GetBy Cloud Network Subnet Find One By - Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- Subnet
Id string - Subnet ID
- available
Ips Double - Number of available ips in subnet
- cidr String
- CIDR
- created
At String - Datetime when the subnet was created
- creator
Task StringId - Task that created this entity
- dns
Nameservers List<String> - List IP addresses of a DNS resolver reachable from the network
- enable
Dhcp Boolean - True if DHCP should be enabled
- gateway
Ip String - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- has
Router Boolean - Deprecated. Always returns
false. - host
Routes List<GetCloud Network Subnet Host Route> - List of custom static routes to advertise via DHCP.
- id String
- Subnet ID
- ip
Version Double - IP version Available values: 4, 6.
- name String
- Subnet name
- network
Id String - Network ID
- region String
- Region name
-
List<Get
Cloud Network Subnet Tag> - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- total
Ips Double - Total number of ips in subnet
- updated
At String - Datetime when the subnet was last updated
- find
One GetBy Cloud Network Subnet Find One By - project
Id Double - Project ID
- region
Id Double - Region ID
- subnet
Id String - Subnet ID
- available
Ips number - Number of available ips in subnet
- cidr string
- CIDR
- created
At string - Datetime when the subnet was created
- creator
Task stringId - Task that created this entity
- dns
Nameservers string[] - List IP addresses of a DNS resolver reachable from the network
- enable
Dhcp boolean - True if DHCP should be enabled
- gateway
Ip string - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- has
Router boolean - Deprecated. Always returns
false. - host
Routes GetCloud Network Subnet Host Route[] - List of custom static routes to advertise via DHCP.
- id string
- Subnet ID
- ip
Version number - IP version Available values: 4, 6.
- name string
- Subnet name
- network
Id string - Network ID
- region string
- Region name
-
Get
Cloud Network Subnet Tag[] - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- total
Ips number - Total number of ips in subnet
- updated
At string - Datetime when the subnet was last updated
- find
One GetBy Cloud Network Subnet Find One By - project
Id number - Project ID
- region
Id number - Region ID
- subnet
Id string - Subnet ID
- available_
ips float - Number of available ips in subnet
- cidr str
- CIDR
- created_
at str - Datetime when the subnet was created
- creator_
task_ strid - Task that created this entity
- dns_
nameservers Sequence[str] - List IP addresses of a DNS resolver reachable from the network
- enable_
dhcp bool - True if DHCP should be enabled
- gateway_
ip str - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- has_
router bool - Deprecated. Always returns
false. - host_
routes Sequence[GetCloud Network Subnet Host Route] - List of custom static routes to advertise via DHCP.
- id str
- Subnet ID
- ip_
version float - IP version Available values: 4, 6.
- name str
- Subnet name
- network_
id str - Network ID
- region str
- Region name
-
Sequence[Get
Cloud Network Subnet Tag] - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- total_
ips float - Total number of ips in subnet
- updated_
at str - Datetime when the subnet was last updated
- find_
one_ Getby Cloud Network Subnet Find One By - project_
id float - Project ID
- region_
id float - Region ID
- subnet_
id str - Subnet ID
- available
Ips Number - Number of available ips in subnet
- cidr String
- CIDR
- created
At String - Datetime when the subnet was created
- creator
Task StringId - Task that created this entity
- dns
Nameservers List<String> - List IP addresses of a DNS resolver reachable from the network
- enable
Dhcp Boolean - True if DHCP should be enabled
- gateway
Ip String - Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.
- has
Router Boolean - Deprecated. Always returns
false. - host
Routes List<Property Map> - List of custom static routes to advertise via DHCP.
- id String
- Subnet ID
- ip
Version Number - IP version Available values: 4, 6.
- name String
- Subnet name
- network
Id String - Network ID
- region String
- Region name
- List<Property Map>
- List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- total
Ips Number - Total number of ips in subnet
- updated
At String - Datetime when the subnet was last updated
- find
One Property MapBy - project
Id Number - Project ID
- region
Id Number - Region ID
- subnet
Id String - Subnet ID
Supporting Types
GetCloudNetworkSubnetFindOneBy
- Order
By string - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - Owned
By string - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- Network
Id string - Only list subnets of this network
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys List<string> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- Order
By string - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - Owned
By string - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- Network
Id string - Only list subnets of this network
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys []string - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- order
By String - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - owned
By String - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- network
Id String - Only list subnets of this network
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- order
By string - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - owned
By string - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- network
Id string - Only list subnets of this network
- tag
Key stringValue - Optional. Filter by tag key-value pairs.
- tag
Keys string[] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- order_
by str - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - owned_
by str - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- network_
id str - Only list subnets of this network
- tag_
key_ strvalue - Optional. Filter by tag key-value pairs.
- tag_
keys Sequence[str] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- order
By String - Ordering subnets list result by
name,created_at,updated_at,available_ips,total_ips, andcidr(default) fields of the subnet and directions (name.asc). Available values: "availableips.asc", "availableips.desc", "cidr.asc", "cidr.desc", "createdat.asc", "createdat.desc", "name.asc", "name.desc", "totalips.asc", "totalips.desc", "updatedat.asc", "updatedat.desc". - owned
By String - Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks. Available values: "any", "project".
- network
Id String - Only list subnets of this network
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
GetCloudNetworkSubnetHostRoute
- Destination string
- CIDR of destination IPv4 or IPv6 subnet.
- Nexthop string
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
- Destination string
- CIDR of destination IPv4 or IPv6 subnet.
- Nexthop string
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
- destination String
- CIDR of destination IPv4 or IPv6 subnet.
- nexthop String
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
- destination string
- CIDR of destination IPv4 or IPv6 subnet.
- nexthop string
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
- destination str
- CIDR of destination IPv4 or IPv6 subnet.
- nexthop str
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
- destination String
- CIDR of destination IPv4 or IPv6 subnet.
- nexthop String
- IPv4 or IPv6 address to forward traffic to if it's destination IP matches 'destination' CIDR.
GetCloudNetworkSubnetTag
- Key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Read
Only bool - If true, the tag is read-only and cannot be modified by the user
- Value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Read
Only bool - If true, the tag is read-only and cannot be modified by the user
- Value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key String
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only Boolean - If true, the tag is read-only and cannot be modified by the user
- value String
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only boolean - If true, the tag is read-only and cannot be modified by the user
- value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key str
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read_
only bool - If true, the tag is read-only and cannot be modified by the user
- value str
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key String
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only Boolean - If true, the tag is read-only and cannot be modified by the user
- value String
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
Viewing docs for gcore 2.0.0-alpha.3
published on Monday, Mar 30, 2026 by g-core
published on Monday, Mar 30, 2026 by g-core
