Hetzner Cloud v1.26.0 published on Wednesday, Nov 5, 2025 by Pulumi
hcloud.getZoneRrsets
Start a Neo task
Explain and create a hcloud.getZoneRrsets resource
Provides a list of Hetzner Cloud Zone Resource Record Set (RRSet).
See the Zone RRSets API documentation for more details.
Experimental: DNS API is in beta, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const example = hcloud.getZone({
name: "example.com",
});
const all = example.then(example => hcloud.getZoneRrsets({
zone: example.name,
}));
const byLabel = example.then(example => hcloud.getZoneRrsets({
zone: example.name,
withSelector: "key=value",
}));
import pulumi
import pulumi_hcloud as hcloud
example = hcloud.get_zone(name="example.com")
all = hcloud.get_zone_rrsets(zone=example.name)
by_label = hcloud.get_zone_rrsets(zone=example.name,
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 {
example, err := hcloud.LookupZone(ctx, &hcloud.LookupZoneArgs{
Name: pulumi.StringRef("example.com"),
}, nil)
if err != nil {
return err
}
_, err = hcloud.GetZoneRrsets(ctx, &hcloud.GetZoneRrsetsArgs{
Zone: example.Name,
}, nil)
if err != nil {
return err
}
_, err = hcloud.GetZoneRrsets(ctx, &hcloud.GetZoneRrsetsArgs{
Zone: example.Name,
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 example = HCloud.GetZone.Invoke(new()
{
Name = "example.com",
});
var all = HCloud.GetZoneRrsets.Invoke(new()
{
Zone = example.Apply(getZoneResult => getZoneResult.Name),
});
var byLabel = HCloud.GetZoneRrsets.Invoke(new()
{
Zone = example.Apply(getZoneResult => getZoneResult.Name),
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.GetZoneArgs;
import com.pulumi.hcloud.inputs.GetZoneRrsetsArgs;
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 example = HcloudFunctions.getZone(GetZoneArgs.builder()
.name("example.com")
.build());
final var all = HcloudFunctions.getZoneRrsets(GetZoneRrsetsArgs.builder()
.zone(example.name())
.build());
final var byLabel = HcloudFunctions.getZoneRrsets(GetZoneRrsetsArgs.builder()
.zone(example.name())
.withSelector("key=value")
.build());
}
}
variables:
example:
fn::invoke:
function: hcloud:getZone
arguments:
name: example.com
all:
fn::invoke:
function: hcloud:getZoneRrsets
arguments:
zone: ${example.name}
byLabel:
fn::invoke:
function: hcloud:getZoneRrsets
arguments:
zone: ${example.name}
withSelector: key=value
Using getZoneRrsets
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 getZoneRrsets(args: GetZoneRrsetsArgs, opts?: InvokeOptions): Promise<GetZoneRrsetsResult>
function getZoneRrsetsOutput(args: GetZoneRrsetsOutputArgs, opts?: InvokeOptions): Output<GetZoneRrsetsResult>def get_zone_rrsets(with_selector: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZoneRrsetsResult
def get_zone_rrsets_output(with_selector: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZoneRrsetsResult]func GetZoneRrsets(ctx *Context, args *GetZoneRrsetsArgs, opts ...InvokeOption) (*GetZoneRrsetsResult, error)
func GetZoneRrsetsOutput(ctx *Context, args *GetZoneRrsetsOutputArgs, opts ...InvokeOption) GetZoneRrsetsResultOutput> Note: This function is named GetZoneRrsets in the Go SDK.
public static class GetZoneRrsets
{
public static Task<GetZoneRrsetsResult> InvokeAsync(GetZoneRrsetsArgs args, InvokeOptions? opts = null)
public static Output<GetZoneRrsetsResult> Invoke(GetZoneRrsetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZoneRrsetsResult> getZoneRrsets(GetZoneRrsetsArgs args, InvokeOptions options)
public static Output<GetZoneRrsetsResult> getZoneRrsets(GetZoneRrsetsArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getZoneRrsets:getZoneRrsets
arguments:
# arguments dictionaryThe following arguments are supported:
- Zone string
- ID or Name of the parent Zone.
- With
Selector string - Filter results using a Label Selector
- Zone string
- ID or Name of the parent Zone.
- With
Selector string - Filter results using a Label Selector
- zone String
- ID or Name of the parent Zone.
- with
Selector String - Filter results using a Label Selector
- zone string
- ID or Name of the parent Zone.
- with
Selector string - Filter results using a Label Selector
- zone str
- ID or Name of the parent Zone.
- with_
selector str - Filter results using a Label Selector
- zone String
- ID or Name of the parent Zone.
- with
Selector String - Filter results using a Label Selector
getZoneRrsets Result
The following output properties are available:
- Id string
- The ID of this resource.
- Rrsets
List<Pulumi.
HCloud. Outputs. Get Zone Rrsets Rrset> - Zone string
- ID or Name of the parent Zone.
- With
Selector string - Filter results using a Label Selector
- Id string
- The ID of this resource.
- Rrsets
[]Get
Zone Rrsets Rrset - Zone string
- ID or Name of the parent Zone.
- With
Selector string - Filter results using a Label Selector
- id String
- The ID of this resource.
- rrsets
List<Get
Zone Rrsets Rrset> - zone String
- ID or Name of the parent Zone.
- with
Selector String - Filter results using a Label Selector
- id string
- The ID of this resource.
- rrsets
Get
Zone Rrsets Rrset[] - zone string
- ID or Name of the parent Zone.
- with
Selector string - Filter results using a Label Selector
- id str
- The ID of this resource.
- rrsets
Sequence[Get
Zone Rrsets Rrset] - zone str
- ID or Name of the parent Zone.
- with_
selector str - Filter results using a Label Selector
- id String
- The ID of this resource.
- rrsets List<Property Map>
- zone String
- ID or Name of the parent Zone.
- with
Selector String - Filter results using a Label Selector
Supporting Types
GetZoneRrsetsRrset
- Change
Protection bool - Whether change protection is enabled.
- Id string
- ID of the Zone RRSet.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Records
List<Pulumi.
HCloud. Inputs. Get Zone Rrsets Rrset Record> - Records of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- Change
Protection bool - Whether change protection is enabled.
- Id string
- ID of the Zone RRSet.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Records
[]Get
Zone Rrsets Rrset Record - Records of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- id String
- ID of the Zone RRSet.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- records
List<Get
Zone Rrsets Rrset Record> - Records of the Zone RRSet.
- ttl Integer
- Time To Live (TTL) of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
- change
Protection boolean - Whether change protection is enabled.
- id string
- ID of the Zone RRSet.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- name string
- Name of the Zone RRSet.
- records
Get
Zone Rrsets Rrset Record[] - Records of the Zone RRSet.
- ttl number
- Time To Live (TTL) of the Zone RRSet.
- type string
- Type of the Zone RRSet.
- zone string
- ID or Name of the parent Zone.
- change_
protection bool - Whether change protection is enabled.
- id str
- ID of the Zone RRSet.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- name str
- Name of the Zone RRSet.
- records
Sequence[Get
Zone Rrsets Rrset Record] - Records of the Zone RRSet.
- ttl int
- Time To Live (TTL) of the Zone RRSet.
- type str
- Type of the Zone RRSet.
- zone str
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- id String
- ID of the Zone RRSet.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- records List<Property Map>
- Records of the Zone RRSet.
- ttl Number
- Time To Live (TTL) of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
GetZoneRrsetsRrsetRecord
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
