1. Packages
  2. Hcloud Provider
  3. API Docs
  4. getZoneRrsets
Hetzner Cloud v1.26.0 published on Wednesday, Nov 5, 2025 by Pulumi

hcloud.getZoneRrsets

Get Started
hcloud logo
Hetzner Cloud v1.26.0 published on Wednesday, Nov 5, 2025 by Pulumi

    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 dictionary

    The following arguments are supported:

    Zone string
    ID or Name of the parent Zone.
    WithSelector string
    Filter results using a Label Selector
    Zone string
    ID or Name of the parent Zone.
    WithSelector string
    Filter results using a Label Selector
    zone String
    ID or Name of the parent Zone.
    withSelector String
    Filter results using a Label Selector
    zone string
    ID or Name of the parent Zone.
    withSelector 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.
    withSelector 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.GetZoneRrsetsRrset>
    Zone string
    ID or Name of the parent Zone.
    WithSelector string
    Filter results using a Label Selector
    Id string
    The ID of this resource.
    Rrsets []GetZoneRrsetsRrset
    Zone string
    ID or Name of the parent Zone.
    WithSelector string
    Filter results using a Label Selector
    id String
    The ID of this resource.
    rrsets List<GetZoneRrsetsRrset>
    zone String
    ID or Name of the parent Zone.
    withSelector String
    Filter results using a Label Selector
    id string
    The ID of this resource.
    rrsets GetZoneRrsetsRrset[]
    zone string
    ID or Name of the parent Zone.
    withSelector string
    Filter results using a Label Selector
    id str
    The ID of this resource.
    rrsets Sequence[GetZoneRrsetsRrset]
    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.
    withSelector String
    Filter results using a Label Selector

    Supporting Types

    GetZoneRrsetsRrset

    ChangeProtection 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.GetZoneRrsetsRrsetRecord>
    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.
    ChangeProtection 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 []GetZoneRrsetsRrsetRecord
    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.
    changeProtection 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<GetZoneRrsetsRrsetRecord>
    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.
    changeProtection 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 GetZoneRrsetsRrsetRecord[]
    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[GetZoneRrsetsRrsetRecord]
    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.
    changeProtection 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

    Comment string
    Comment of the record.
    Value string
    Value of the record.
    Comment string
    Comment of the record.
    Value string
    Value of the record.
    comment String
    Comment of the record.
    value String
    Value of the record.
    comment string
    Comment of the record.
    value string
    Value of the record.
    comment str
    Comment of the record.
    value str
    Value of the record.
    comment String
    Comment of the record.
    value String
    Value of the record.

    Package Details

    Repository
    Hetzner Cloud pulumi/pulumi-hcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcloud Terraform Provider.
    hcloud logo
    Hetzner Cloud v1.26.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate