GetDnsZone

Use this data source to access information about an existing Private DNS Zone.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.PrivateDns.GetDnsZone.InvokeAsync(new Azure.PrivateDns.GetDnsZoneArgs
        {
            Name = "contoso.internal",
            ResourceGroupName = "contoso-dns",
        }));
        this.PrivateDnsZoneId = example.Apply(example => example.Id);
    }

    [Output("privateDnsZoneId")]
    public Output<string> PrivateDnsZoneId { get; set; }
}
package main

import (
    "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 {
        opt0 := "contoso-dns"
        example, err := privatedns.GetDnsZone(ctx, &privatedns.GetDnsZoneArgs{
            Name:              "contoso.internal",
            ResourceGroupName: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("privateDnsZoneId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.privatedns.get_dns_zone(name="contoso.internal",
    resource_group_name="contoso-dns")
pulumi.export("privateDnsZoneId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.privatedns.getDnsZone({
    name: "contoso.internal",
    resourceGroupName: "contoso-dns",
});
export const privateDnsZoneId = example.then(example => example.id);

Using GetDnsZone

function getDnsZone(args: GetDnsZoneArgs, opts?: InvokeOptions): Promise<GetDnsZoneResult>
function  get_dns_zone(name=None, resource_group_name=None, opts=None)
func GetDnsZone(ctx *Context, args *GetDnsZoneArgs, opts ...InvokeOption) (*GetDnsZoneResult, error)
public static class GetDnsZone {
    public static Task<GetDnsZoneResult> InvokeAsync(GetDnsZoneArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Private DNS Zone.

ResourceGroupName string

The Name of the Resource Group where the Private DNS Zone exists. If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private DNS Zones in your subscription that matches name will be returned.

Name string

The name of the Private DNS Zone.

ResourceGroupName string

The Name of the Resource Group where the Private DNS Zone exists. If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private DNS Zones in your subscription that matches name will be returned.

name string

The name of the Private DNS Zone.

resourceGroupName string

The Name of the Resource Group where the Private DNS Zone exists. If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private DNS Zones in your subscription that matches name will be returned.

name str

The name of the Private DNS Zone.

resource_group_name str

The Name of the Resource Group where the Private DNS Zone exists. If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private DNS Zones in your subscription that matches name will be returned.

GetDnsZone Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

MaxNumberOfRecordSets int

Maximum number of recordsets that can be created in this Private Zone.

MaxNumberOfVirtualNetworkLinks int

Maximum number of Virtual Networks that can be linked to this Private Zone.

MaxNumberOfVirtualNetworkLinksWithRegistration int

Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.

Name string
NumberOfRecordSets int

The number of recordsets currently in the zone.

ResourceGroupName string
Tags Dictionary<string, string>

A mapping of tags for the zone.

Id string

The provider-assigned unique ID for this managed resource.

MaxNumberOfRecordSets int

Maximum number of recordsets that can be created in this Private Zone.

MaxNumberOfVirtualNetworkLinks int

Maximum number of Virtual Networks that can be linked to this Private Zone.

MaxNumberOfVirtualNetworkLinksWithRegistration int

Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.

Name string
NumberOfRecordSets int

The number of recordsets currently in the zone.

ResourceGroupName string
Tags map[string]string

A mapping of tags for the zone.

id string

The provider-assigned unique ID for this managed resource.

maxNumberOfRecordSets number

Maximum number of recordsets that can be created in this Private Zone.

maxNumberOfVirtualNetworkLinks number

Maximum number of Virtual Networks that can be linked to this Private Zone.

maxNumberOfVirtualNetworkLinksWithRegistration number

Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.

name string
numberOfRecordSets number

The number of recordsets currently in the zone.

resourceGroupName string
tags {[key: string]: string}

A mapping of tags for the zone.

id str

The provider-assigned unique ID for this managed resource.

max_number_of_record_sets float

Maximum number of recordsets that can be created in this Private Zone.

max_number_of_virtual_network_links float

Maximum number of Virtual Networks that can be linked to this Private Zone.

max_number_of_virtual_network_links_with_registration float

Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.

name str
number_of_record_sets float

The number of recordsets currently in the zone.

resource_group_name str
tags Dict[str, str]

A mapping of tags for the zone.

Package Details

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