Zone

Enables you to manage DNS zones within Azure DNS. These zones are hosted on Azure’s name servers to which you can delegate the zone from the parent domain.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Azure.Core.ResourceGroup("example", new Azure.Core.ResourceGroupArgs
        {
            Location = "West US",
        });
        var example_public = new Azure.Dns.Zone("example-public", new Azure.Dns.ZoneArgs
        {
            ResourceGroupName = example.Name,
        });
        var example_private = new Azure.PrivateDns.Zone("example-private", new Azure.PrivateDns.ZoneArgs
        {
            ResourceGroupName = example.Name,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/dns"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/privatedns"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
            Location: pulumi.String("West US"),
        })
        if err != nil {
            return err
        }
        _, err = dns.NewZone(ctx, "example-public", &dns.ZoneArgs{
            ResourceGroupName: example.Name,
        })
        if err != nil {
            return err
        }
        _, err = privatedns.NewZone(ctx, "example-private", &privatedns.ZoneArgs{
            ResourceGroupName: example.Name,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example", location="West US")
example_public = azure.dns.Zone("example-public", resource_group_name=example.name)
example_private = azure.privatedns.Zone("example-private", resource_group_name=example.name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {location: "West US"});
const example_public = new azure.dns.Zone("example-public", {resourceGroupName: example.name});
const example_private = new azure.privatedns.Zone("example-private", {resourceGroupName: example.name});

Create a Zone Resource

new Zone(name: string, args: ZoneArgs, opts?: CustomResourceOptions);
def Zone(resource_name, opts=None, name=None, resource_group_name=None, tags=None, __props__=None);
func NewZone(ctx *Context, name string, args ZoneArgs, opts ...ResourceOption) (*Zone, error)
public Zone(string name, ZoneArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Zone Resource Properties

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

Inputs

The Zone resource accepts the following input properties:

ResourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

Name string

The name of the DNS Zone. Must be a valid domain name.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ResourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

Name string

The name of the DNS Zone. Must be a valid domain name.

Tags map[string]string

A mapping of tags to assign to the resource.

resourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

name string

The name of the DNS Zone. Must be a valid domain name.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

resource_group_name str

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

name str

The name of the DNS Zone. Must be a valid domain name.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
MaxNumberOfRecordSets int

(Optional) Maximum number of Records in the zone. Defaults to 1000.

NameServers List<string>

(Optional) A list of values that make up the NS record for the zone.

NumberOfRecordSets int

(Optional) The number of records already in the zone.

Id string
The provider-assigned unique ID for this managed resource.
MaxNumberOfRecordSets int

(Optional) Maximum number of Records in the zone. Defaults to 1000.

NameServers []string

(Optional) A list of values that make up the NS record for the zone.

NumberOfRecordSets int

(Optional) The number of records already in the zone.

id string
The provider-assigned unique ID for this managed resource.
maxNumberOfRecordSets number

(Optional) Maximum number of Records in the zone. Defaults to 1000.

nameServers string[]

(Optional) A list of values that make up the NS record for the zone.

numberOfRecordSets number

(Optional) The number of records already in the zone.

id str
The provider-assigned unique ID for this managed resource.
max_number_of_record_sets float

(Optional) Maximum number of Records in the zone. Defaults to 1000.

name_servers List[str]

(Optional) A list of values that make up the NS record for the zone.

number_of_record_sets float

(Optional) The number of records already in the zone.

Look up an Existing Zone Resource

Get an existing Zone 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?: ZoneState, opts?: CustomResourceOptions): Zone
static get(resource_name, id, opts=None, max_number_of_record_sets=None, name=None, name_servers=None, number_of_record_sets=None, resource_group_name=None, tags=None, __props__=None);
func GetZone(ctx *Context, name string, id IDInput, state *ZoneState, opts ...ResourceOption) (*Zone, error)
public static Zone Get(string name, Input<string> id, ZoneState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

MaxNumberOfRecordSets int

(Optional) Maximum number of Records in the zone. Defaults to 1000.

Name string

The name of the DNS Zone. Must be a valid domain name.

NameServers List<string>

(Optional) A list of values that make up the NS record for the zone.

NumberOfRecordSets int

(Optional) The number of records already in the zone.

ResourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

MaxNumberOfRecordSets int

(Optional) Maximum number of Records in the zone. Defaults to 1000.

Name string

The name of the DNS Zone. Must be a valid domain name.

NameServers []string

(Optional) A list of values that make up the NS record for the zone.

NumberOfRecordSets int

(Optional) The number of records already in the zone.

ResourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

Tags map[string]string

A mapping of tags to assign to the resource.

maxNumberOfRecordSets number

(Optional) Maximum number of Records in the zone. Defaults to 1000.

name string

The name of the DNS Zone. Must be a valid domain name.

nameServers string[]

(Optional) A list of values that make up the NS record for the zone.

numberOfRecordSets number

(Optional) The number of records already in the zone.

resourceGroupName string

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

max_number_of_record_sets float

(Optional) Maximum number of Records in the zone. Defaults to 1000.

name str

The name of the DNS Zone. Must be a valid domain name.

name_servers List[str]

(Optional) A list of values that make up the NS record for the zone.

number_of_record_sets float

(Optional) The number of records already in the zone.

resource_group_name str

Specifies the resource group where the resource exists. Changing this forces a new resource to be created.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.