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

Fixes empty parameters for amba service hook and email contact #1818

Closed arjenhuitema closed 2 weeks ago

arjenhuitema commented 3 weeks ago

Overview/Summary

This pull request addresses an issue with the Portal Accelerator related to the Azure Monitor Baseline Alerts notification settings. The problem occurred when neither an email address nor a service hook was specified on the Baseline alerts and monitoring tab. In such cases, an empty string was being converted to an array in the format [""] rather than []. This led to errors during the remediation of the Notification Assets initiative.

This PR fixes/adds/changes/removes

  1. Sets ALZWebhookServiceUri to null if ambaAgServiceHook is empty; otherwise, it uses the value of ambaAgServiceHook.
  2. Sets ALZMonitorActionGroupEmail to null if ambaAgEmailContact is empty; otherwise, it uses the value of ambaAgEmailContact.

Breaking Changes

None

Testing Evidence

An empty string is now properly converted to an empty array during deployment. image

Remediation:

image

When a value is defined. image

Testing URLs

The below URLs can be updated where the placeholders are, look for {YOUR GITHUB BRANCH NAME HERE - Remove Curly Brackets Also} & {YOUR GITHUB BRANCH NAME HERE - Remove Curly Brackets Also}, to allow you to test your portal deployment experience.

Please also replace the curly brackets on the placeholders {}

Azure Public

Deploy To Azure

As part of this Pull Request I have