Azure / ALZ-Bicep

This repository contains the Azure Landing Zones (ALZ) Bicep modules that help deliver and deploy the Azure Landing Zone conceptual architecture in a modular approach. https://aka.ms/alz/docs
MIT License
764 stars 514 forks source link

fix: Private DNS Zones Bug (#695) #891

Closed jtracey93 closed 2 weeks ago

jtracey93 commented 3 weeks ago

Overview/Summary

This PR Fixes the Private DNS Zones Bug #695

Related Issues/Work Items

Fixes #695

This PR fixes/adds/changes/removes

Breaking Changes

A number of breaking changes

Draft Release Notes The local private DNS zones modules (`privateDnsZones.bicep`) has been replaced in the networking related modules in this repo with the AVM Pattern module of [`avm/ptn/network/private-link-private-dns-zones`](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/network/private-link-private-dns-zones) to resolve bug #695. This has meant some breaking changes to each of the networking modules that are detailed below. #### `privateDnsZones.bicep` - This module has been removed as of `v0.20.0` and replaced with the AVM Pattern Module of [`avm/ptn/network/private-link-private-dns-zones`](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/network/private-link-private-dns-zones). Please use this module going forward. #### `hubNetworking.bicep` & `hubNetworking-multiRegion.bicep` - `parPrivateDnsZones` default value changed to an empty array (`[]`) - Only enter values in here if you want to override the defaults in the underlying AVM pattern module. See: https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/network/private-link-private-dns-zones#parameter-privatelinkprivatednszones - `parPrivateDnsZoneAutoMergeAzureBackupZone` removed from module - `parVirtualNetworkResourceIdsToLinkTo` added to module, you can prefer to use this parameter instead of `parVirtualNetworkIdToLink` & `parVirtualNetworkIdToLinkFailover` if you wish (they are automatically all merged together by the module anyway) - The value returned in `outPrivateDnsZones` has changed **From:** ``` [ { "name": "privatelink.api.azureml.ms", "id": "/subscriptions//resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.api.azureml.ms" }, { "name": "privatelink.notebooks.azure.net", "id": "subscriptions//resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.notebooks.azure.net" }, … ] ``` **To:** ``` [ { "pdnsZoneName": "privatelink.api.azureml.ms", "virtualNetworkResourceIdsToLinkTo": [ "/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/alz-hub-uksouth" ] }, { "pdnsZoneName": "privatelink.notebooks.azure.net", "virtualNetworkResourceIdsToLinkTo": [ "/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/alz-hub-uksouth" ] }, … ] ``` #### `vwanConnectivity.bicep` - `parPrivateDnsZones` default value changed to an empty array (`[]`) - Only enter values in here if you want to override the defaults in the underlying AVM pattern module. See: https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/network/private-link-private-dns-zones#parameter-privatelinkprivatednszones - `parVirtualNetworkIdToLink` & `parVirtualNetworkIdToLinkFailover` removed from module and replaced with `parVirtualNetworkResourceIdsToLinkTo` - The value returned in `outPrivateDnsZones` has changed **From:** ``` [ { "name": "privatelink.api.azureml.ms", "id": "/subscriptions//resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.api.azureml.ms" }, { "name": "privatelink.notebooks.azure.net", "id": "subscriptions//resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.notebooks.azure.net" }, … ] ``` **To:** ``` [ { "pdnsZoneName": "privatelink.api.azureml.ms", "virtualNetworkResourceIdsToLinkTo": [ "/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/alz-hub-uksouth" ] }, { "pdnsZoneName": "privatelink.notebooks.azure.net", "virtualNetworkResourceIdsToLinkTo": [ "/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/alz-hub-uksouth" ] }, … ] ```

Testing Evidence

Screenshot 2024-11-01 162738

Screenshot 2024-11-01 162804

As part of this Pull Request I have

jtracey93 commented 3 weeks ago

@oZakari & @sebassem would appreciate a review here. Especially around the accelerator and multi region angle

jtracey93 commented 2 weeks ago

LGTM , should we add an example specifically for multi-region to make it clear how to add region-aware private dns zones ?

@sebassem is this not already in the hub spoke multi-region, where i call the DNS zones twice with a different location.

I actually plan on adding the feature to my AVM modules to make it a simpler toggle

oZakari commented 2 weeks ago

/azp run validateazcloud

azure-pipelines[bot] commented 2 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).