Azure Landing Zones Documentation
Home GitHub Issue Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

5 - Turn off Private DNS zones and Private DNS resolver

You can choose to not deploy any DNS related resources. In order to do that, you need to update the DNS configuration and disable the DINE (deploy if not exists) policy.

The steps to follow are:

  1. Make the following settings changes by searching for the keys and updating or removing the values

    Setting TypeParent block(s)KeyActionCountNotes
    linecustom_replacements > namesdns_resource_group_nameDelete (optional)1
    linecustom_replacements > names<region>_private_dns_resolver_nameDelete (optional)1+<region> is the relevant region (e.g. primary or secondary)
    linecustom_replacements > names<region>_auto_registration_zone_nameDelete (optional)1+<region> is the relevant region (e.g. primary or secondary)
    linecustom_replacements > names<region>_private_dns_resolver_subnet_address_prefixDelete (optional)1+<region> is the relevant region (e.g. primary or secondary)
    linemanagement_group_settings > policy_default_valuesprivate_dns_zone_subscription_idDelete1
    linemanagement_group_settings > policy_default_valuesprivate_dns_zone_regionDelete1
    linemanagement_group_settings > policy_default_valuesprivate_dns_zone_resource_group_nameDelete1
    linehub_and_spoke_vnet_virtual_networks > private_dns_zones OR virtual_wan_virtual_hubs > private_dns_zonesenabledUpdate setting to false1+There will be two instances for a multi-region deployment
  2. Add the follow configuration to the management_group_settings > policy_assignments_to_modify block setting

    If you have updated the corp management group ID, then you need to update the management group ID in this block setting to match. For example, replace corp with contoso-corp.
    corp = {
      policy_assignments = {
        Deploy-Private-DNS-Zones = {
          enforcement_mode = "DoNotEnforce"
        }
      }
    }