We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
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/v4/go/azure/privatedns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := privatedns.GetDnsZone(ctx, &privatedns.GetDnsZoneArgs{
Name: "contoso.internal",
ResourceGroupName: pulumi.StringRef("contoso-dns"),
}, nil)
if err != nil {
return err
}
ctx.Export("privateDnsZoneId", example.Id)
return nil
})
}
Example coming soon!
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);
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)
Example coming soon!
Using getDnsZone
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDnsZone(args: GetDnsZoneArgs, opts?: InvokeOptions): Promise<GetDnsZoneResult>
function getDnsZoneOutput(args: GetDnsZoneOutputArgs, opts?: InvokeOptions): Output<GetDnsZoneResult>def get_dns_zone(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDnsZoneResult
def get_dns_zone_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDnsZoneResult]func GetDnsZone(ctx *Context, args *GetDnsZoneArgs, opts ...InvokeOption) (*GetDnsZoneResult, error)
func GetDnsZoneOutput(ctx *Context, args *GetDnsZoneOutputArgs, opts ...InvokeOption) GetDnsZoneResultOutput> Note: This function is named GetDnsZone in the Go SDK.
public static class GetDnsZone
{
public static Task<GetDnsZoneResult> InvokeAsync(GetDnsZoneArgs args, InvokeOptions? opts = null)
public static Output<GetDnsZoneResult> Invoke(GetDnsZoneInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDnsZoneResult> getDnsZone(GetDnsZoneArgs args, InvokeOptions options)
public static Output<GetDnsZoneResult> getDnsZone(GetDnsZoneArgs args, InvokeOptions options)
fn::invoke:
function: azure:privatedns/getDnsZone:getDnsZone
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Private DNS Zone.
- Resource
Group stringName - 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
namewill be returned.
- Name string
- The name of the Private DNS Zone.
- Resource
Group stringName - 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
namewill be returned.
- name String
- The name of the Private DNS Zone.
- resource
Group StringName - 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
namewill be returned.
- name string
- The name of the Private DNS Zone.
- resource
Group stringName - 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
namewill be returned.
- name str
- The name of the Private DNS Zone.
- resource_
group_ strname - 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
namewill be returned.
- name String
- The name of the Private DNS Zone.
- resource
Group StringName - 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
namewill be returned.
getDnsZone Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Max
Number intOf Record Sets - Maximum number of recordsets that can be created in this Private Zone.
- Max
Number intOf Virtual Network Links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- Max
Number intOf Virtual Network Links With Registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- Name string
- Number
Of intRecord Sets - The number of recordsets currently in the zone.
- Resource
Group stringName - Dictionary<string, string>
- A mapping of tags for the zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- Max
Number intOf Record Sets - Maximum number of recordsets that can be created in this Private Zone.
- Max
Number intOf Virtual Network Links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- Max
Number intOf Virtual Network Links With Registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- Name string
- Number
Of intRecord Sets - The number of recordsets currently in the zone.
- Resource
Group stringName - map[string]string
- A mapping of tags for the zone.
- id String
- The provider-assigned unique ID for this managed resource.
- max
Number IntegerOf Record Sets - Maximum number of recordsets that can be created in this Private Zone.
- max
Number IntegerOf Virtual Network Links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- max
Number IntegerOf Virtual Network Links With Registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- name String
- number
Of IntegerRecord Sets - The number of recordsets currently in the zone.
- resource
Group StringName - Map<String,String>
- A mapping of tags for the zone.
- id string
- The provider-assigned unique ID for this managed resource.
- max
Number numberOf Record Sets - Maximum number of recordsets that can be created in this Private Zone.
- max
Number numberOf Virtual Network Links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- max
Number numberOf Virtual Network Links With Registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- name string
- number
Of numberRecord Sets - The number of recordsets currently in the zone.
- resource
Group stringName - {[key: string]: string}
- A mapping of tags for the zone.
- id str
- The provider-assigned unique ID for this managed resource.
- max_
number_ intof_ record_ sets - Maximum number of recordsets that can be created in this Private Zone.
- max_
number_ intof_ virtual_ network_ links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- max_
number_ intof_ virtual_ network_ links_ with_ registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- name str
- number_
of_ intrecord_ sets - The number of recordsets currently in the zone.
- resource_
group_ strname - Mapping[str, str]
- A mapping of tags for the zone.
- id String
- The provider-assigned unique ID for this managed resource.
- max
Number NumberOf Record Sets - Maximum number of recordsets that can be created in this Private Zone.
- max
Number NumberOf Virtual Network Links - Maximum number of Virtual Networks that can be linked to this Private Zone.
- max
Number NumberOf Virtual Network Links With Registration - Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
- name String
- number
Of NumberRecord Sets - The number of recordsets currently in the zone.
- resource
Group StringName - Map<String>
- A mapping of tags for the zone.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
