Private DNS zone with virtual network link on creation.

Matthew MacKarill 1 Reputation point
2022-05-26T15:07:37.027+00:00

We currently have a hub and spoke setup with our Custom DNS on a single Subscription. what we want to do is if new DNS zones are created they get linked to the Custome DNS Vnet.

Could this be done by azure policy

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
670 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,412 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
868 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Arnav Sharma 11 Reputation points MVP
    2022-06-29T23:42:56.413+00:00

    Something like this

    https://github.com/Azure/Community-Policy/tree/master/Policies/Network/enforce_vnet_dns_servers

    Or you can do it via powershell/automation: powershell scans for DNS and if not linked, a condition will link it

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.