Zone

Enables you to manage Private DNS zones within Azure DNS. These zones are hosted on Azure’s name servers.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleZone = new Azure.PrivateDns.Zone("exampleZone", new Azure.PrivateDns.ZoneArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
        });
    }

}
package main

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

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

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_zone = azure.privatedns.Zone("exampleZone", resource_group_name=example_resource_group.name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleZone = new azure.privatedns.Zone("exampleZone", {resourceGroupName: exampleResourceGroup.name});

Create a Zone Resource

new Zone(name: string, args: ZoneArgs, opts?: CustomResourceOptions);
@overload
def Zone(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         name: Optional[str] = None,
         resource_group_name: Optional[str] = None,
         soa_record: Optional[ZoneSoaRecordArgs] = None,
         tags: Optional[Mapping[str, str]] = None)
@overload
def Zone(resource_name: str,
         args: ZoneArgs,
         opts: Optional[ResourceOptions] = 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.
args ZoneArgs
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 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 Private DNS Zone. Must be a valid domain name.
SoaRecord ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the Record Set.
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 Private DNS Zone. Must be a valid domain name.
SoaRecord ZoneSoaRecord
An soa_record block as defined below. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the Record Set.
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 Private DNS Zone. Must be a valid domain name.
soaRecord ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the Record Set.
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 Private DNS Zone. Must be a valid domain name.
soa_record ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the Record Set.

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
The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfVirtualNetworkLinks int
The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinksWithRegistration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
NumberOfRecordSets int
The current number of record sets in this Private DNS zone.
Id string
The provider-assigned unique ID for this managed resource.
MaxNumberOfRecordSets int
The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfVirtualNetworkLinks int
The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinksWithRegistration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
NumberOfRecordSets int
The current number of record sets in this Private DNS zone.
id string
The provider-assigned unique ID for this managed resource.
maxNumberOfRecordSets number
The maximum number of record sets that can be created in this Private DNS zone.
maxNumberOfVirtualNetworkLinks number
The maximum number of virtual networks that can be linked to this Private DNS zone.
maxNumberOfVirtualNetworkLinksWithRegistration number
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
numberOfRecordSets number
The current number of record sets in this Private DNS zone.
id str
The provider-assigned unique ID for this managed resource.
max_number_of_record_sets int
The maximum number of record sets that can be created in this Private DNS zone.
max_number_of_virtual_network_links int
The maximum number of virtual networks that can be linked to this Private DNS zone.
max_number_of_virtual_network_links_with_registration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
number_of_record_sets int
The current number of record sets in this Private DNS 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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        max_number_of_record_sets: Optional[int] = None,
        max_number_of_virtual_network_links: Optional[int] = None,
        max_number_of_virtual_network_links_with_registration: Optional[int] = None,
        name: Optional[str] = None,
        number_of_record_sets: Optional[int] = None,
        resource_group_name: Optional[str] = None,
        soa_record: Optional[ZoneSoaRecordArgs] = None,
        tags: Optional[Mapping[str, str]] = None) -> Zone
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
The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfVirtualNetworkLinks int
The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinksWithRegistration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
Name string
The name of the Private DNS Zone. Must be a valid domain name.
NumberOfRecordSets int
The current number of record sets in this Private DNS zone.
ResourceGroupName string
Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
SoaRecord ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the Record Set.
MaxNumberOfRecordSets int
The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfVirtualNetworkLinks int
The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinksWithRegistration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
Name string
The name of the Private DNS Zone. Must be a valid domain name.
NumberOfRecordSets int
The current number of record sets in this Private DNS zone.
ResourceGroupName string
Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
SoaRecord ZoneSoaRecord
An soa_record block as defined below. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the Record Set.
maxNumberOfRecordSets number
The maximum number of record sets that can be created in this Private DNS zone.
maxNumberOfVirtualNetworkLinks number
The maximum number of virtual networks that can be linked to this Private DNS zone.
maxNumberOfVirtualNetworkLinksWithRegistration number
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
name string
The name of the Private DNS Zone. Must be a valid domain name.
numberOfRecordSets number
The current number of record sets in this Private DNS zone.
resourceGroupName string
Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
soaRecord ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the Record Set.
max_number_of_record_sets int
The maximum number of record sets that can be created in this Private DNS zone.
max_number_of_virtual_network_links int
The maximum number of virtual networks that can be linked to this Private DNS zone.
max_number_of_virtual_network_links_with_registration int
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
name str
The name of the Private DNS Zone. Must be a valid domain name.
number_of_record_sets int
The current number of record sets in this Private DNS zone.
resource_group_name str
Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
soa_record ZoneSoaRecordArgs
An soa_record block as defined below. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the Record Set.

Supporting Types

ZoneSoaRecord

Email string
The email contact for the SOA record.
ExpireTime int
The expire time for the SOA record. Defaults to 2419200.
Fqdn string
The fully qualified domain name of the Record Set.
HostName string
The domain name of the authoritative name server for the SOA record.
MinimumTtl int
The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10.
RefreshTime int
The refresh time for the SOA record. Defaults to 3600.
RetryTime int
The retry time for the SOA record. Defaults to 300.
SerialNumber int
The serial number for the SOA record.
Tags Dictionary<string, string>
A mapping of tags to assign to the Record Set.
Ttl int
The Time To Live of the SOA Record in seconds. Defaults to 3600.
Email string
The email contact for the SOA record.
ExpireTime int
The expire time for the SOA record. Defaults to 2419200.
Fqdn string
The fully qualified domain name of the Record Set.
HostName string
The domain name of the authoritative name server for the SOA record.
MinimumTtl int
The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10.
RefreshTime int
The refresh time for the SOA record. Defaults to 3600.
RetryTime int
The retry time for the SOA record. Defaults to 300.
SerialNumber int
The serial number for the SOA record.
Tags map[string]string
A mapping of tags to assign to the Record Set.
Ttl int
The Time To Live of the SOA Record in seconds. Defaults to 3600.
email string
The email contact for the SOA record.
expireTime number
The expire time for the SOA record. Defaults to 2419200.
fqdn string
The fully qualified domain name of the Record Set.
hostName string
The domain name of the authoritative name server for the SOA record.
minimumTtl number
The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10.
refreshTime number
The refresh time for the SOA record. Defaults to 3600.
retryTime number
The retry time for the SOA record. Defaults to 300.
serialNumber number
The serial number for the SOA record.
tags {[key: string]: string}
A mapping of tags to assign to the Record Set.
ttl number
The Time To Live of the SOA Record in seconds. Defaults to 3600.
email str
The email contact for the SOA record.
expire_time int
The expire time for the SOA record. Defaults to 2419200.
fqdn str
The fully qualified domain name of the Record Set.
host_name str
The domain name of the authoritative name server for the SOA record.
minimum_ttl int
The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10.
refresh_time int
The refresh time for the SOA record. Defaults to 3600.
retry_time int
The retry time for the SOA record. Defaults to 300.
serial_number int
The serial number for the SOA record.
tags Mapping[str, str]
A mapping of tags to assign to the Record Set.
ttl int
The Time To Live of the SOA Record in seconds. Defaults to 3600.

Import

Private DNS Zones can be imported using the resource id, e.g.

 $ pulumi import azure:privatedns/zone:Zone zone1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1

Package Details

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