Table: azure_dns_zone - Query Azure DNS Zones using SQL
Azure DNS is a hosting service for DNS domains, providing name resolution using Microsoft Azure infrastructure. By hosting domains in Azure, it provides you with the same reliability and performance provided to Microsoft’s global network. Azure DNS also supports private DNS domains.
Table Usage Guide
The azure_dns_zone
table provides insights into DNS zones within Microsoft Azure. As a network administrator, explore DNS zone-specific details through this table, including record sets, number of record sets, and associated metadata. Utilize it to uncover information about DNS zones, such as those with certain properties, the relationships between different zones, and the verification of DNS settings.
Examples
Basic info
This query allows you to analyze the configuration of your Azure DNS zones. It helps you identify instances where specific tags are used, providing insights into the organization and management of your resources.
select name, resource_group, tagsfrom azure_dns_zone;
select name, resource_group, tagsfrom azure_dns_zone;
List public DNS zones with record sets
Explore which public DNS zones in your Azure environment contain more than one record set. This can help in managing and organizing your DNS records effectively.
select name, resource_groupfrom azure_dns_zonewhere number_of_record_sets > 1;
select name, resource_groupfrom azure_dns_zonewhere number_of_record_sets > 1;
List public DNS zones with delegated name servers
Determine the areas in which public DNS zones are utilizing delegated name servers, which can be beneficial for those seeking to manage or troubleshoot their DNS configurations.
select name, resource_group, nsfrom azure_dns_zone, jsonb_array_elements_text(name_servers) as nswhere zone_type = 'Public' and ns not like '%.azure-dns.%.';
select name, resource_group, ns.value as nsfrom azure_dns_zone, json_each(name_servers) as nswhere zone_type = 'Public' and ns.value not like '%.azure-dns.%.';
Schema for azure_dns_zone
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
etag | text | An unique read-only string that changes whenever the resource is updated. | |
id | text | Contains ID to identify a DNS zone uniquely. | |
max_number_of_record_sets | bigint | The maximum number of record sets that can be created in this DNS zone. | |
max_number_of_records_per_record_set | bigint | The maximum number of records per record set that can be created in this DNS zone. | |
name | text | = | The friendly name that identifies the DNS zone. |
name_servers | jsonb | The name servers for this DNS zone. | |
number_of_record_sets | bigint | The current number of record sets in this DNS zone. | |
region | text | The Azure region/location in which the resource is located. | |
registration_virtual_networks | jsonb | A list of references to virtual networks that register hostnames in this DNS zone. | |
resolution_virtual_networks | jsonb | A list of references to virtual networks that resolve records in this DNS zone. | |
resource_group | text | = | The resource group which holds this resource. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
type | text | The resource type of the DNS zone. | |
zone_type | text | The type of this DNS zone (always `Public`, see `azure_private_dns_zone` table for private DNS zones). |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_dns_zone