Azure / Enterprise-Scale

The Azure Landing Zones (Enterprise-Scale) architecture provides prescriptive guidance coupled with Azure best practices, and it follows design principles across the critical design areas for organizations to define their Azure architecture
https://aka.ms/alz
MIT License
1.72k stars 980 forks source link

Diagnostic profiles regression when moving from v5 to v6 #1839

Open LaurentLesle opened 2 months ago

LaurentLesle commented 2 months ago

Community Note

Versions

terraform: 1.9.5

azure provider: 3.107.0

module: 6.1.0

Description

Until version 5.x it was possible to create diagnostic profiles with Metrics and for some resource like Firewall and API Management to store the logs into dedicated tables.

Following the upgrade to version 6 which is transitioning to the built-in policies those features are not available anymore and are not documented into the upgrade wiki breaking change section <link>.

Describe the bug

In Versions <= 5 the policy assignment Deploy-Resource-Diag was used. Example of the policy parameters

Deploy-Resource-Diag:
        logAnalytics: ${log_analytics_workspace_resource_id}
        APIMgmtLogAnalyticsDestinationType: Dedicated
        FirewallLogAnalyticsDestinationType: Dedicated
        profileName: setbypolicy

From V6 Deploy-Resource-Diag has been replaced by Deploy-Diag-Logs >> link

Three Bugs in Deploy-Diag-Logs:

  1. Does not support Metrics
  2. Does not support Destination tabled like Dedicated
  3. Upgrade note does not explain how to change from Deploy-Resource-Diag to Deploy-Diag-Logs

I understand the motivation to move to native policies but it should only been done if it is at feature parity.

Steps to Reproduce

  1. Deploy ALZ module version 5 with the above settings and a firewall in secure hub
  2. Trigger the policy remediation to get the diagnostic profiles created
  3. Upgrade to v6.1.0
  4. trigger a policy remediation

Screenshots

Additional context

https://github.com/Azure/azure-policy/blob/50fb8cf4c71dc97530398c71094ca9ff98930e30/built-in-policies/policyDefinitions/Monitoring/DS_LA_network-azurefirewalls_DINE.json

matt-FFFFFF commented 1 week ago

Hi @Springstone can you comment please?