1. Packages
  2. Gcore Provider
  3. API Docs
  4. DnsZone
gcore 0.29.4 published on Thursday, Sep 25, 2025 by g-core

gcore.DnsZone

Explore with Pulumi AI

gcore logo
gcore 0.29.4 published on Thursday, Sep 25, 2025 by g-core

    Represent DNS zone resource. https://dns.gcore.com/zones

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    // Basic DNS Zone example - minimal configuration
    const exampleZone = new gcore.DnsZone("exampleZone", {});
    // Advanced DNS Zone example - showcasing all available options
    const advancedZone = new gcore.DnsZone("advancedZone", {
        contact: "admin@advanced-example.com",
        dnssec: true,
        enabled: true,
        expiry: 604800,
        meta: {
            environment: "production",
            managed_by: "terraform",
            webhook_method: "POST",
            webhook_url: "https://hooks.example.com/dns-changes",
        },
        nxTtl: 3600,
        primaryServer: "ns1.advanced-example.com.",
        refresh: 3600,
        retry: 1800,
        serial: 2024010100,
    });
    // YYYYMMDDNN format
    // DNS Zone with DNSSEC disabled (explicit)
    const simpleZone = new gcore.DnsZone("simpleZone", {
        contact: "hostmaster@simple-example.org",
        dnssec: false,
        expiry: 1209600,
        refresh: 7200,
        retry: 3600,
    });
    // 1 hour
    // DNS Zone for development/testing (disabled)
    const testZone = new gcore.DnsZone("testZone", {
        contact: "devops@test-example.dev",
        enabled: false,
        meta: {
            auto_delete: "true",
            environment: "testing",
            owner: "development-team",
        },
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    # Basic DNS Zone example - minimal configuration
    example_zone = gcore.DnsZone("exampleZone")
    # Advanced DNS Zone example - showcasing all available options
    advanced_zone = gcore.DnsZone("advancedZone",
        contact="admin@advanced-example.com",
        dnssec=True,
        enabled=True,
        expiry=604800,
        meta={
            "environment": "production",
            "managed_by": "terraform",
            "webhook_method": "POST",
            "webhook_url": "https://hooks.example.com/dns-changes",
        },
        nx_ttl=3600,
        primary_server="ns1.advanced-example.com.",
        refresh=3600,
        retry=1800,
        serial=2024010100)
    # YYYYMMDDNN format
    # DNS Zone with DNSSEC disabled (explicit)
    simple_zone = gcore.DnsZone("simpleZone",
        contact="hostmaster@simple-example.org",
        dnssec=False,
        expiry=1209600,
        refresh=7200,
        retry=3600)
    # 1 hour
    # DNS Zone for development/testing (disabled)
    test_zone = gcore.DnsZone("testZone",
        contact="devops@test-example.dev",
        enabled=False,
        meta={
            "auto_delete": "true",
            "environment": "testing",
            "owner": "development-team",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Basic DNS Zone example - minimal configuration
    		_, err := gcore.NewDnsZone(ctx, "exampleZone", nil)
    		if err != nil {
    			return err
    		}
    		// Advanced DNS Zone example - showcasing all available options
    		_, err = gcore.NewDnsZone(ctx, "advancedZone", &gcore.DnsZoneArgs{
    			Contact: pulumi.String("admin@advanced-example.com"),
    			Dnssec:  pulumi.Bool(true),
    			Enabled: pulumi.Bool(true),
    			Expiry:  pulumi.Float64(604800),
    			Meta: pulumi.StringMap{
    				"environment":    pulumi.String("production"),
    				"managed_by":     pulumi.String("terraform"),
    				"webhook_method": pulumi.String("POST"),
    				"webhook_url":    pulumi.String("https://hooks.example.com/dns-changes"),
    			},
    			NxTtl:         pulumi.Float64(3600),
    			PrimaryServer: pulumi.String("ns1.advanced-example.com."),
    			Refresh:       pulumi.Float64(3600),
    			Retry:         pulumi.Float64(1800),
    			Serial:        pulumi.Float64(2024010100),
    		})
    		if err != nil {
    			return err
    		}
    		// DNS Zone with DNSSEC disabled (explicit)
    		_, err = gcore.NewDnsZone(ctx, "simpleZone", &gcore.DnsZoneArgs{
    			Contact: pulumi.String("hostmaster@simple-example.org"),
    			Dnssec:  pulumi.Bool(false),
    			Expiry:  pulumi.Float64(1209600),
    			Refresh: pulumi.Float64(7200),
    			Retry:   pulumi.Float64(3600),
    		})
    		if err != nil {
    			return err
    		}
    		// DNS Zone for development/testing (disabled)
    		_, err = gcore.NewDnsZone(ctx, "testZone", &gcore.DnsZoneArgs{
    			Contact: pulumi.String("devops@test-example.dev"),
    			Enabled: pulumi.Bool(false),
    			Meta: pulumi.StringMap{
    				"auto_delete": pulumi.String("true"),
    				"environment": pulumi.String("testing"),
    				"owner":       pulumi.String("development-team"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        // Basic DNS Zone example - minimal configuration
        var exampleZone = new Gcore.DnsZone("exampleZone");
    
        // Advanced DNS Zone example - showcasing all available options
        var advancedZone = new Gcore.DnsZone("advancedZone", new()
        {
            Contact = "admin@advanced-example.com",
            Dnssec = true,
            Enabled = true,
            Expiry = 604800,
            Meta = 
            {
                { "environment", "production" },
                { "managed_by", "terraform" },
                { "webhook_method", "POST" },
                { "webhook_url", "https://hooks.example.com/dns-changes" },
            },
            NxTtl = 3600,
            PrimaryServer = "ns1.advanced-example.com.",
            Refresh = 3600,
            Retry = 1800,
            Serial = 2024010100,
        });
    
        // YYYYMMDDNN format
        // DNS Zone with DNSSEC disabled (explicit)
        var simpleZone = new Gcore.DnsZone("simpleZone", new()
        {
            Contact = "hostmaster@simple-example.org",
            Dnssec = false,
            Expiry = 1209600,
            Refresh = 7200,
            Retry = 3600,
        });
    
        // 1 hour
        // DNS Zone for development/testing (disabled)
        var testZone = new Gcore.DnsZone("testZone", new()
        {
            Contact = "devops@test-example.dev",
            Enabled = false,
            Meta = 
            {
                { "auto_delete", "true" },
                { "environment", "testing" },
                { "owner", "development-team" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.DnsZone;
    import com.pulumi.gcore.DnsZoneArgs;
    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) {
            // Basic DNS Zone example - minimal configuration
            var exampleZone = new DnsZone("exampleZone");
    
            // Advanced DNS Zone example - showcasing all available options
            var advancedZone = new DnsZone("advancedZone", DnsZoneArgs.builder()
                .contact("admin@advanced-example.com")
                .dnssec(true)
                .enabled(true)
                .expiry(604800)
                .meta(Map.ofEntries(
                    Map.entry("environment", "production"),
                    Map.entry("managed_by", "terraform"),
                    Map.entry("webhook_method", "POST"),
                    Map.entry("webhook_url", "https://hooks.example.com/dns-changes")
                ))
                .nxTtl(3600)
                .primaryServer("ns1.advanced-example.com.")
                .refresh(3600)
                .retry(1800)
                .serial(2024010100)
                .build());
    
            // YYYYMMDDNN format
            // DNS Zone with DNSSEC disabled (explicit)
            var simpleZone = new DnsZone("simpleZone", DnsZoneArgs.builder()
                .contact("hostmaster@simple-example.org")
                .dnssec(false)
                .expiry(1209600)
                .refresh(7200)
                .retry(3600)
                .build());
    
            // 1 hour
            // DNS Zone for development/testing (disabled)
            var testZone = new DnsZone("testZone", DnsZoneArgs.builder()
                .contact("devops@test-example.dev")
                .enabled(false)
                .meta(Map.ofEntries(
                    Map.entry("auto_delete", "true"),
                    Map.entry("environment", "testing"),
                    Map.entry("owner", "development-team")
                ))
                .build());
    
        }
    }
    
    resources:
      # Basic DNS Zone example - minimal configuration
      exampleZone:
        type: gcore:DnsZone
      # Advanced DNS Zone example - showcasing all available options
      advancedZone:
        type: gcore:DnsZone
        properties:
          # SOA record fields
          contact: admin@advanced-example.com
          dnssec: true
          enabled: true
          expiry: 604800
          # 1 week
          #     // Meta configuration with webhook
          meta:
            environment: production
            managed_by: terraform
            webhook_method: POST
            webhook_url: https://hooks.example.com/dns-changes
          nxTtl: 3600
          # 1 hour
          primaryServer: ns1.advanced-example.com.
          refresh: 3600
          # 1 hour
          retry: 1800
          # 30 minutes
          serial: 2.0240101e+09
      # DNS Zone with DNSSEC disabled (explicit)
      simpleZone:
        type: gcore:DnsZone
        properties:
          # Basic SOA configuration
          contact: hostmaster@simple-example.org
          dnssec: false
          expiry: 1.2096e+06
          refresh: 7200
          # 2 hours
          retry: 3600
      # DNS Zone for development/testing (disabled)
      testZone:
        type: gcore:DnsZone
        properties:
          contact: devops@test-example.dev
          enabled: false
          # Zone disabled, records won't resolve
          #     // Custom meta for testing
          meta:
            auto_delete: 'true'
            environment: testing
            owner: development-team
    

    Create DnsZone Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DnsZone(name: string, args?: DnsZoneArgs, opts?: CustomResourceOptions);
    @overload
    def DnsZone(resource_name: str,
                args: Optional[DnsZoneArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsZone(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                contact: Optional[str] = None,
                dns_zone_id: Optional[str] = None,
                dnssec: Optional[bool] = None,
                enabled: Optional[bool] = None,
                expiry: Optional[float] = None,
                meta: Optional[Mapping[str, str]] = None,
                name: Optional[str] = None,
                nx_ttl: Optional[float] = None,
                primary_server: Optional[str] = None,
                refresh: Optional[float] = None,
                retry: Optional[float] = None,
                serial: Optional[float] = None,
                timeouts: Optional[DnsZoneTimeoutsArgs] = None)
    func NewDnsZone(ctx *Context, name string, args *DnsZoneArgs, opts ...ResourceOption) (*DnsZone, error)
    public DnsZone(string name, DnsZoneArgs? args = null, CustomResourceOptions? opts = null)
    public DnsZone(String name, DnsZoneArgs args)
    public DnsZone(String name, DnsZoneArgs args, CustomResourceOptions options)
    
    type: gcore:DnsZone
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsZoneArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dnsZoneResource = new Gcore.DnsZone("dnsZoneResource", new()
    {
        Contact = "string",
        DnsZoneId = "string",
        Dnssec = false,
        Enabled = false,
        Expiry = 0,
        Meta = 
        {
            { "string", "string" },
        },
        Name = "string",
        NxTtl = 0,
        PrimaryServer = "string",
        Refresh = 0,
        Retry = 0,
        Serial = 0,
        Timeouts = new Gcore.Inputs.DnsZoneTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := gcore.NewDnsZone(ctx, "dnsZoneResource", &gcore.DnsZoneArgs{
    	Contact:   pulumi.String("string"),
    	DnsZoneId: pulumi.String("string"),
    	Dnssec:    pulumi.Bool(false),
    	Enabled:   pulumi.Bool(false),
    	Expiry:    pulumi.Float64(0),
    	Meta: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:          pulumi.String("string"),
    	NxTtl:         pulumi.Float64(0),
    	PrimaryServer: pulumi.String("string"),
    	Refresh:       pulumi.Float64(0),
    	Retry:         pulumi.Float64(0),
    	Serial:        pulumi.Float64(0),
    	Timeouts: &gcore.DnsZoneTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
        .contact("string")
        .dnsZoneId("string")
        .dnssec(false)
        .enabled(false)
        .expiry(0.0)
        .meta(Map.of("string", "string"))
        .name("string")
        .nxTtl(0.0)
        .primaryServer("string")
        .refresh(0.0)
        .retry(0.0)
        .serial(0.0)
        .timeouts(DnsZoneTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    dns_zone_resource = gcore.DnsZone("dnsZoneResource",
        contact="string",
        dns_zone_id="string",
        dnssec=False,
        enabled=False,
        expiry=0,
        meta={
            "string": "string",
        },
        name="string",
        nx_ttl=0,
        primary_server="string",
        refresh=0,
        retry=0,
        serial=0,
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const dnsZoneResource = new gcore.DnsZone("dnsZoneResource", {
        contact: "string",
        dnsZoneId: "string",
        dnssec: false,
        enabled: false,
        expiry: 0,
        meta: {
            string: "string",
        },
        name: "string",
        nxTtl: 0,
        primaryServer: "string",
        refresh: 0,
        retry: 0,
        serial: 0,
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: gcore:DnsZone
    properties:
        contact: string
        dnsZoneId: string
        dnssec: false
        enabled: false
        expiry: 0
        meta:
            string: string
        name: string
        nxTtl: 0
        primaryServer: string
        refresh: 0
        retry: 0
        serial: 0
        timeouts:
            create: string
            delete: string
    

    DnsZone Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DnsZone resource accepts the following input properties:

    Contact string
    Email address of the administrator responsible for this zone
    DnsZoneId string
    The ID of this resource.
    Dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    Enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    Expiry double
    number of seconds after which secondary name servers should stop answering request for this zone
    Meta Dictionary<string, string>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    Name string
    A name of DNS Zone resource.
    NxTtl double
    Time To Live of cache
    PrimaryServer string
    Primary master name server for zone
    Refresh double
    number of seconds after which secondary name servers should refresh the zone
    Retry double
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    Timeouts DnsZoneTimeouts
    Contact string
    Email address of the administrator responsible for this zone
    DnsZoneId string
    The ID of this resource.
    Dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    Enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    Expiry float64
    number of seconds after which secondary name servers should stop answering request for this zone
    Meta map[string]string
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    Name string
    A name of DNS Zone resource.
    NxTtl float64
    Time To Live of cache
    PrimaryServer string
    Primary master name server for zone
    Refresh float64
    number of seconds after which secondary name servers should refresh the zone
    Retry float64
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    Timeouts DnsZoneTimeoutsArgs
    contact String
    Email address of the administrator responsible for this zone
    dnsZoneId String
    The ID of this resource.
    dnssec Boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled Boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry Double
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Map<String,String>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name String
    A name of DNS Zone resource.
    nxTtl Double
    Time To Live of cache
    primaryServer String
    Primary master name server for zone
    refresh Double
    number of seconds after which secondary name servers should refresh the zone
    retry Double
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeouts
    contact string
    Email address of the administrator responsible for this zone
    dnsZoneId string
    The ID of this resource.
    dnssec boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry number
    number of seconds after which secondary name servers should stop answering request for this zone
    meta {[key: string]: string}
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name string
    A name of DNS Zone resource.
    nxTtl number
    Time To Live of cache
    primaryServer string
    Primary master name server for zone
    refresh number
    number of seconds after which secondary name servers should refresh the zone
    retry number
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeouts
    contact str
    Email address of the administrator responsible for this zone
    dns_zone_id str
    The ID of this resource.
    dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry float
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Mapping[str, str]
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name str
    A name of DNS Zone resource.
    nx_ttl float
    Time To Live of cache
    primary_server str
    Primary master name server for zone
    refresh float
    number of seconds after which secondary name servers should refresh the zone
    retry float
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeoutsArgs
    contact String
    Email address of the administrator responsible for this zone
    dnsZoneId String
    The ID of this resource.
    dnssec Boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled Boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry Number
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Map<String>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name String
    A name of DNS Zone resource.
    nxTtl Number
    Time To Live of cache
    primaryServer String
    Primary master name server for zone
    refresh Number
    number of seconds after which secondary name servers should refresh the zone
    retry Number
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DnsZone resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DnsZone Resource

    Get an existing DnsZone resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DnsZoneState, opts?: CustomResourceOptions): DnsZone
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            contact: Optional[str] = None,
            dns_zone_id: Optional[str] = None,
            dnssec: Optional[bool] = None,
            enabled: Optional[bool] = None,
            expiry: Optional[float] = None,
            meta: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            nx_ttl: Optional[float] = None,
            primary_server: Optional[str] = None,
            refresh: Optional[float] = None,
            retry: Optional[float] = None,
            serial: Optional[float] = None,
            timeouts: Optional[DnsZoneTimeoutsArgs] = None) -> DnsZone
    func GetDnsZone(ctx *Context, name string, id IDInput, state *DnsZoneState, opts ...ResourceOption) (*DnsZone, error)
    public static DnsZone Get(string name, Input<string> id, DnsZoneState? state, CustomResourceOptions? opts = null)
    public static DnsZone get(String name, Output<String> id, DnsZoneState state, CustomResourceOptions options)
    resources:  _:    type: gcore:DnsZone    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Contact string
    Email address of the administrator responsible for this zone
    DnsZoneId string
    The ID of this resource.
    Dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    Enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    Expiry double
    number of seconds after which secondary name servers should stop answering request for this zone
    Meta Dictionary<string, string>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    Name string
    A name of DNS Zone resource.
    NxTtl double
    Time To Live of cache
    PrimaryServer string
    Primary master name server for zone
    Refresh double
    number of seconds after which secondary name servers should refresh the zone
    Retry double
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    Timeouts DnsZoneTimeouts
    Contact string
    Email address of the administrator responsible for this zone
    DnsZoneId string
    The ID of this resource.
    Dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    Enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    Expiry float64
    number of seconds after which secondary name servers should stop answering request for this zone
    Meta map[string]string
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    Name string
    A name of DNS Zone resource.
    NxTtl float64
    Time To Live of cache
    PrimaryServer string
    Primary master name server for zone
    Refresh float64
    number of seconds after which secondary name servers should refresh the zone
    Retry float64
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    Timeouts DnsZoneTimeoutsArgs
    contact String
    Email address of the administrator responsible for this zone
    dnsZoneId String
    The ID of this resource.
    dnssec Boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled Boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry Double
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Map<String,String>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name String
    A name of DNS Zone resource.
    nxTtl Double
    Time To Live of cache
    primaryServer String
    Primary master name server for zone
    refresh Double
    number of seconds after which secondary name servers should refresh the zone
    retry Double
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeouts
    contact string
    Email address of the administrator responsible for this zone
    dnsZoneId string
    The ID of this resource.
    dnssec boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry number
    number of seconds after which secondary name servers should stop answering request for this zone
    meta {[key: string]: string}
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name string
    A name of DNS Zone resource.
    nxTtl number
    Time To Live of cache
    primaryServer string
    Primary master name server for zone
    refresh number
    number of seconds after which secondary name servers should refresh the zone
    retry number
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeouts
    contact str
    Email address of the administrator responsible for this zone
    dns_zone_id str
    The ID of this resource.
    dnssec bool
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled bool
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry float
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Mapping[str, str]
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name str
    A name of DNS Zone resource.
    nx_ttl float
    Time To Live of cache
    primary_server str
    Primary master name server for zone
    refresh float
    number of seconds after which secondary name servers should refresh the zone
    retry float
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts DnsZoneTimeoutsArgs
    contact String
    Email address of the administrator responsible for this zone
    dnsZoneId String
    The ID of this resource.
    dnssec Boolean
    Activation or deactivation of DNSSEC for the zone.Set it to true to enable DNSSEC for the zone or false to disable it.By default, DNSSEC is set to false wich means it is disabled.
    enabled Boolean
    Default: true. If a zone is disabled, then its records will not be resolved on dns servers
    expiry Number
    number of seconds after which secondary name servers should stop answering request for this zone
    meta Map<String>
    Arbitrary data of zone in JSON format. You can specify webhook URL and webhookmethod here. Webhook will receive a map with three arrays: for created, updated, and deleted rrsets. webhookmethod can be omitted; POST will be used by default.
    name String
    A name of DNS Zone resource.
    nxTtl Number
    Time To Live of cache
    primaryServer String
    Primary master name server for zone
    refresh Number
    number of seconds after which secondary name servers should refresh the zone
    retry Number
    number of seconds after which secondary name servers should retry to request the serial number
    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.
    timeouts Property Map

    Supporting Types

    DnsZoneTimeouts, DnsZoneTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    import using zone name format

    $ pulumi import gcore:index/dnsZone:DnsZone example_zone example_zone.com
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.29.4 published on Thursday, Sep 25, 2025 by g-core
      AI Agentic Workflows: Register now