Skip to content

Data Source: azurermPrivateDnsZone

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

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermPrivateDnsZoneExample =
  new azurerm.dataAzurermPrivateDnsZone.DataAzurermPrivateDnsZone(
    this,
    "example",
    {
      name: "contoso.internal",
      resource_group_name: "contoso-dns",
    }
  );
new cdktf.TerraformOutput(this, "private_dns_zone_id", {
  value: dataAzurermPrivateDnsZoneExample.id,
});

Argument Reference

  • name - The name of the Private DNS Zone.

  • resourceGroupName - (Optional) 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.

Attributes Reference

  • id - The ID of the Private DNS Zone.

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

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

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

  • numberOfRecordSets - The number of recordsets currently in the zone.

  • tags - A mapping of tags for the zone.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Private DNS Zone.