1. Packages
  2. Gcore Provider
  3. API Docs
  4. getDnsZone
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
gcore logo
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core

    DNS zones are authoritative containers for domain name records, with support for DNSSEC and SOA configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleDnsZone = gcore.getDnsZone({
        name: "name",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_dns_zone = gcore.get_dns_zone(name="name")
    
    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.LookupDnsZone(ctx, &gcore.LookupDnsZoneArgs{
    			Name: "name",
    		}, 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 exampleDnsZone = Gcore.GetDnsZone.Invoke(new()
        {
            Name = "name",
        });
    
    });
    
    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.GetDnsZoneArgs;
    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 exampleDnsZone = GcoreFunctions.getDnsZone(GetDnsZoneArgs.builder()
                .name("name")
                .build());
    
        }
    }
    
    variables:
      exampleDnsZone:
        fn::invoke:
          function: gcore:getDnsZone
          arguments:
            name: name
    

    Using getDnsZone

    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 getDnsZone(args: GetDnsZoneArgs, opts?: InvokeOptions): Promise<GetDnsZoneResult>
    function getDnsZoneOutput(args: GetDnsZoneOutputArgs, opts?: InvokeOptions): Output<GetDnsZoneResult>
    def get_dns_zone(name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDnsZoneResult
    def get_dns_zone_output(name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDnsZoneResult]
    func LookupDnsZone(ctx *Context, args *LookupDnsZoneArgs, opts ...InvokeOption) (*LookupDnsZoneResult, error)
    func LookupDnsZoneOutput(ctx *Context, args *LookupDnsZoneOutputArgs, opts ...InvokeOption) LookupDnsZoneResultOutput

    > Note: This function is named LookupDnsZone in the Go SDK.

    public static class GetDnsZone 
    {
        public static Task<GetDnsZoneResult> InvokeAsync(GetDnsZoneArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsZoneResult> Invoke(GetDnsZoneInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnsZoneResult> getDnsZone(GetDnsZoneArgs args, InvokeOptions options)
    public static Output<GetDnsZoneResult> getDnsZone(GetDnsZoneArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getDnsZone:getDnsZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name string
    name String
    name string
    name str
    name String

    getDnsZone Result

    The following output properties are available:

    Contact string
    email address of the administrator responsible for this zone
    DnssecEnabled bool
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    Enabled bool
    Expiry double
    number of seconds after which secondary name servers should stop answering request for this zone
    Id double
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    Meta Dictionary<string, string>
    arbitrarily data of zone in json format
    Name string
    NxTtl double
    Time To Live of cache
    PrimaryServer string
    primary master name server for zone
    Records List<GetDnsZoneRecord>
    Refresh double
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    Retry double
    number of seconds after which secondary name servers should retry to request the serial number
    RrsetsAmount GetDnsZoneRrsetsAmount
    Serial double
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    Status string
    Contact string
    email address of the administrator responsible for this zone
    DnssecEnabled bool
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    Enabled bool
    Expiry float64
    number of seconds after which secondary name servers should stop answering request for this zone
    Id float64
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    Meta map[string]string
    arbitrarily data of zone in json format
    Name string
    NxTtl float64
    Time To Live of cache
    PrimaryServer string
    primary master name server for zone
    Records []GetDnsZoneRecord
    Refresh float64
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    Retry float64
    number of seconds after which secondary name servers should retry to request the serial number
    RrsetsAmount GetDnsZoneRrsetsAmount
    Serial float64
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    Status string
    contact String
    email address of the administrator responsible for this zone
    dnssecEnabled Boolean
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    enabled Boolean
    expiry Double
    number of seconds after which secondary name servers should stop answering request for this zone
    id Double
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    meta Map<String,String>
    arbitrarily data of zone in json format
    name String
    nxTtl Double
    Time To Live of cache
    primaryServer String
    primary master name server for zone
    records List<GetDnsZoneRecord>
    refresh Double
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    retry Double
    number of seconds after which secondary name servers should retry to request the serial number
    rrsetsAmount GetDnsZoneRrsetsAmount
    serial Double
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    status String
    contact string
    email address of the administrator responsible for this zone
    dnssecEnabled boolean
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    enabled boolean
    expiry number
    number of seconds after which secondary name servers should stop answering request for this zone
    id number
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    meta {[key: string]: string}
    arbitrarily data of zone in json format
    name string
    nxTtl number
    Time To Live of cache
    primaryServer string
    primary master name server for zone
    records GetDnsZoneRecord[]
    refresh number
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    retry number
    number of seconds after which secondary name servers should retry to request the serial number
    rrsetsAmount GetDnsZoneRrsetsAmount
    serial number
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    status string
    contact str
    email address of the administrator responsible for this zone
    dnssec_enabled bool
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    enabled bool
    expiry float
    number of seconds after which secondary name servers should stop answering request for this zone
    id float
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    meta Mapping[str, str]
    arbitrarily data of zone in json format
    name str
    nx_ttl float
    Time To Live of cache
    primary_server str
    primary master name server for zone
    records Sequence[GetDnsZoneRecord]
    refresh float
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    retry float
    number of seconds after which secondary name servers should retry to request the serial number
    rrsets_amount GetDnsZoneRrsetsAmount
    serial float
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    status str
    contact String
    email address of the administrator responsible for this zone
    dnssecEnabled Boolean
    describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
    enabled Boolean
    expiry Number
    number of seconds after which secondary name servers should stop answering request for this zone
    id Number
    ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
    meta Map<String>
    arbitrarily data of zone in json format
    name String
    nxTtl Number
    Time To Live of cache
    primaryServer String
    primary master name server for zone
    records List<Property Map>
    refresh Number
    number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
    retry Number
    number of seconds after which secondary name servers should retry to request the serial number
    rrsetsAmount Property Map
    serial Number
    Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
    status String

    Supporting Types

    GetDnsZoneRecord

    Name string
    ShortAnswers List<string>
    Ttl double
    Type string
    Name string
    ShortAnswers []string
    Ttl float64
    Type string
    name String
    shortAnswers List<String>
    ttl Double
    type String
    name string
    shortAnswers string[]
    ttl number
    type string
    name str
    short_answers Sequence[str]
    ttl float
    type str
    name String
    shortAnswers List<String>
    ttl Number
    type String

    GetDnsZoneRrsetsAmount

    Dynamic GetDnsZoneRrsetsAmountDynamic
    Amount of dynamic RRsets in zone
    Static double
    Amount of static RRsets in zone
    Total double
    Total amount of RRsets in zone
    Dynamic GetDnsZoneRrsetsAmountDynamic
    Amount of dynamic RRsets in zone
    Static float64
    Amount of static RRsets in zone
    Total float64
    Total amount of RRsets in zone
    dynamic GetDnsZoneRrsetsAmountDynamic
    Amount of dynamic RRsets in zone
    static_ Double
    Amount of static RRsets in zone
    total Double
    Total amount of RRsets in zone
    dynamic GetDnsZoneRrsetsAmountDynamic
    Amount of dynamic RRsets in zone
    static number
    Amount of static RRsets in zone
    total number
    Total amount of RRsets in zone
    dynamic GetDnsZoneRrsetsAmountDynamic
    Amount of dynamic RRsets in zone
    static float
    Amount of static RRsets in zone
    total float
    Total amount of RRsets in zone
    dynamic Property Map
    Amount of dynamic RRsets in zone
    static Number
    Amount of static RRsets in zone
    total Number
    Total amount of RRsets in zone

    GetDnsZoneRrsetsAmountDynamic

    Healthcheck double
    Amount of RRsets with enabled healthchecks
    Total double
    Total amount of dynamic RRsets in zone
    Healthcheck float64
    Amount of RRsets with enabled healthchecks
    Total float64
    Total amount of dynamic RRsets in zone
    healthcheck Double
    Amount of RRsets with enabled healthchecks
    total Double
    Total amount of dynamic RRsets in zone
    healthcheck number
    Amount of RRsets with enabled healthchecks
    total number
    Total amount of dynamic RRsets in zone
    healthcheck float
    Amount of RRsets with enabled healthchecks
    total float
    Total amount of dynamic RRsets in zone
    healthcheck Number
    Amount of RRsets with enabled healthchecks
    total Number
    Total amount of dynamic RRsets in zone

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    Viewing docs for gcore 2.0.0-alpha.2
    published on Tuesday, Mar 24, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.