Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Provides a list of Hetzner Cloud Zone.
See the Zones API documentation for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const all = hcloud.getZones({});
const byLabel = hcloud.getZones({
withSelector: "key=value",
});
import pulumi
import pulumi_hcloud as hcloud
all = hcloud.get_zones()
by_label = hcloud.get_zones(with_selector="key=value")
package main
import (
"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hcloud.GetZones(ctx, &hcloud.GetZonesArgs{}, nil)
if err != nil {
return err
}
_, err = hcloud.GetZones(ctx, &hcloud.GetZonesArgs{
WithSelector: pulumi.StringRef("key=value"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() =>
{
var all = HCloud.GetZones.Invoke();
var byLabel = HCloud.GetZones.Invoke(new()
{
WithSelector = "key=value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetZonesArgs;
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 all = HcloudFunctions.getZones(GetZonesArgs.builder()
.build());
final var byLabel = HcloudFunctions.getZones(GetZonesArgs.builder()
.withSelector("key=value")
.build());
}
}
variables:
all:
fn::invoke:
function: hcloud:getZones
arguments: {}
byLabel:
fn::invoke:
function: hcloud:getZones
arguments:
withSelector: key=value
Using getZones
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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>def get_zones(with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput> Note: This function is named GetZones in the Go SDK.
public static class GetZones
{
public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getZones:getZones
arguments:
# arguments dictionaryThe following arguments are supported:
- With
Selector string - Filter results using a Label Selector
- With
Selector string - Filter results using a Label Selector
- with
Selector String - Filter results using a Label Selector
- with
Selector string - Filter results using a Label Selector
- with_
selector str - Filter results using a Label Selector
- with
Selector String - Filter results using a Label Selector
getZones Result
The following output properties are available:
- Id string
- The ID of this resource.
- Zones
List<Pulumi.
HCloud. Outputs. Get Zones Zone> - With
Selector string - Filter results using a Label Selector
- Id string
- The ID of this resource.
- Zones
[]Get
Zones Zone - With
Selector string - Filter results using a Label Selector
- id String
- The ID of this resource.
- zones
List<Get
Zones Zone> - with
Selector String - Filter results using a Label Selector
- id string
- The ID of this resource.
- zones
Get
Zones Zone[] - with
Selector string - Filter results using a Label Selector
- id str
- The ID of this resource.
- zones
Sequence[Get
Zones Zone] - with_
selector str - Filter results using a Label Selector
- id String
- The ID of this resource.
- zones List<Property Map>
- with
Selector String - Filter results using a Label Selector
Supporting Types
GetZonesZone
-
Pulumi.
HCloud. Inputs. Get Zones Zone Authoritative Nameservers - Authoritative nameservers of the Zone.
- Delete
Protection bool - Whether delete protection is enabled.
- Id int
- ID of the Zone.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Mode string
- Mode of the Zone.
- Name string
- Name of the Zone.
- Primary
Nameservers List<Pulumi.HCloud. Inputs. Get Zones Zone Primary Nameserver> - Primary nameservers of the Zone.
- Registrar string
- Registrar of the Zone.
- Ttl int
- Default Time To Live (TTL) of the Zone.
-
Get
Zones Zone Authoritative Nameservers - Authoritative nameservers of the Zone.
- Delete
Protection bool - Whether delete protection is enabled.
- Id int
- ID of the Zone.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Mode string
- Mode of the Zone.
- Name string
- Name of the Zone.
- Primary
Nameservers []GetZones Zone Primary Nameserver - Primary nameservers of the Zone.
- Registrar string
- Registrar of the Zone.
- Ttl int
- Default Time To Live (TTL) of the Zone.
-
Get
Zones Zone Authoritative Nameservers - Authoritative nameservers of the Zone.
- delete
Protection Boolean - Whether delete protection is enabled.
- id Integer
- ID of the Zone.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- mode String
- Mode of the Zone.
- name String
- Name of the Zone.
- primary
Nameservers List<GetZones Zone Primary Nameserver> - Primary nameservers of the Zone.
- registrar String
- Registrar of the Zone.
- ttl Integer
- Default Time To Live (TTL) of the Zone.
-
Get
Zones Zone Authoritative Nameservers - Authoritative nameservers of the Zone.
- delete
Protection boolean - Whether delete protection is enabled.
- id number
- ID of the Zone.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- mode string
- Mode of the Zone.
- name string
- Name of the Zone.
- primary
Nameservers GetZones Zone Primary Nameserver[] - Primary nameservers of the Zone.
- registrar string
- Registrar of the Zone.
- ttl number
- Default Time To Live (TTL) of the Zone.
-
Get
Zones Zone Authoritative Nameservers - Authoritative nameservers of the Zone.
- delete_
protection bool - Whether delete protection is enabled.
- id int
- ID of the Zone.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- mode str
- Mode of the Zone.
- name str
- Name of the Zone.
- primary_
nameservers Sequence[GetZones Zone Primary Nameserver] - Primary nameservers of the Zone.
- registrar str
- Registrar of the Zone.
- ttl int
- Default Time To Live (TTL) of the Zone.
- Property Map
- Authoritative nameservers of the Zone.
- delete
Protection Boolean - Whether delete protection is enabled.
- id Number
- ID of the Zone.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- mode String
- Mode of the Zone.
- name String
- Name of the Zone.
- primary
Nameservers List<Property Map> - Primary nameservers of the Zone.
- registrar String
- Registrar of the Zone.
- ttl Number
- Default Time To Live (TTL) of the Zone.
GetZonesZoneAuthoritativeNameservers
- Assigneds List<string>
- Authoritative Hetzner nameservers assigned to the Zone.
- Assigneds []string
- Authoritative Hetzner nameservers assigned to the Zone.
- assigneds List<String>
- Authoritative Hetzner nameservers assigned to the Zone.
- assigneds string[]
- Authoritative Hetzner nameservers assigned to the Zone.
- assigneds Sequence[str]
- Authoritative Hetzner nameservers assigned to the Zone.
- assigneds List<String>
- Authoritative Hetzner nameservers assigned to the Zone.
GetZonesZonePrimaryNameserver
- Address string
- Public IPv4 or IPv6 address of the primary nameserver.
- Port int
- Port of the primary nameserver.
- Tsig
Algorithm string - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- Tsig
Key string - Transaction signature (TSIG) key
- Address string
- Public IPv4 or IPv6 address of the primary nameserver.
- Port int
- Port of the primary nameserver.
- Tsig
Algorithm string - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- Tsig
Key string - Transaction signature (TSIG) key
- address String
- Public IPv4 or IPv6 address of the primary nameserver.
- port Integer
- Port of the primary nameserver.
- tsig
Algorithm String - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- tsig
Key String - Transaction signature (TSIG) key
- address string
- Public IPv4 or IPv6 address of the primary nameserver.
- port number
- Port of the primary nameserver.
- tsig
Algorithm string - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- tsig
Key string - Transaction signature (TSIG) key
- address str
- Public IPv4 or IPv6 address of the primary nameserver.
- port int
- Port of the primary nameserver.
- tsig_
algorithm str - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- tsig_
key str - Transaction signature (TSIG) key
- address String
- Public IPv4 or IPv6 address of the primary nameserver.
- port Number
- Port of the primary nameserver.
- tsig
Algorithm String - Transaction signature (TSIG) algorithm used to generate the TSIG key.
- tsig
Key String - Transaction signature (TSIG) key
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
