1. Packages
  2. Gcore Provider
  3. API Docs
  4. DnsZone
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

gcore.DnsZone

Explore with Pulumi AI

gcore logo
gcore 0.22.0 published on Wednesday, Apr 30, 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";
    
    const exampleZone = new gcore.DnsZone("exampleZone", {});
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_zone = gcore.DnsZone("exampleZone")
    
    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 {
    		_, err := gcore.NewDnsZone(ctx, "exampleZone", 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 exampleZone = new Gcore.DnsZone("exampleZone");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.DnsZone;
    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) {
            var exampleZone = new DnsZone("exampleZone");
    
        }
    }
    
    resources:
      exampleZone:
        type: gcore:DnsZone
    

    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,
                dns_zone_id: Optional[str] = None,
                dnssec: Optional[bool] = None,
                name: Optional[str] = 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()
    {
        DnsZoneId = "string",
        Dnssec = false,
        Name = "string",
        Timeouts = new Gcore.Inputs.DnsZoneTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := gcore.NewDnsZone(ctx, "dnsZoneResource", &gcore.DnsZoneArgs{
    	DnsZoneId: pulumi.String("string"),
    	Dnssec:    pulumi.Bool(false),
    	Name:      pulumi.String("string"),
    	Timeouts: &gcore.DnsZoneTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var dnsZoneResource = new DnsZone("dnsZoneResource", DnsZoneArgs.builder()
        .dnsZoneId("string")
        .dnssec(false)
        .name("string")
        .timeouts(DnsZoneTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    dns_zone_resource = gcore.DnsZone("dnsZoneResource",
        dns_zone_id="string",
        dnssec=False,
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const dnsZoneResource = new gcore.DnsZone("dnsZoneResource", {
        dnsZoneId: "string",
        dnssec: false,
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: gcore:DnsZone
    properties:
        dnsZoneId: string
        dnssec: false
        name: string
        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:

    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.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeouts
    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.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeoutsArgs
    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.
    name String
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    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.
    name string
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    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.
    name str
    A name of DNS Zone resource.
    timeouts DnsZoneTimeoutsArgs
    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.
    name String
    A name of DNS Zone resource.
    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,
            dns_zone_id: Optional[str] = None,
            dnssec: Optional[bool] = None,
            name: Optional[str] = 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:
    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.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeouts
    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.
    Name string
    A name of DNS Zone resource.
    Timeouts DnsZoneTimeoutsArgs
    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.
    name String
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    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.
    name string
    A name of DNS Zone resource.
    timeouts DnsZoneTimeouts
    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.
    name str
    A name of DNS Zone resource.
    timeouts DnsZoneTimeoutsArgs
    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.
    name String
    A name of DNS Zone resource.
    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.22.0 published on Wednesday, Apr 30, 2025 by g-core