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
754 stars 506 forks source link

WhatIf parameter in inputObject arrays in powershell script does not accept boolean #794

Closed kmridha92 closed 3 months ago

kmridha92 commented 3 months ago

What happened? Provide a clear and concise description of the bug, including deployment details.

$inputObject4= @{ DeploymentName = 'XXXXXXX-{0}' -f ( -join (Get-Date -Format 'yyyyMMddTHHMMssffffZ')[0..63]) Location = $Location TemplateFile = $TemplateFile TemplateParameterFile = $TemplateParameterFile WhatIf = $WhatIfEnabled Verbose = $true }

It is used in all powershell scripts, but when I pass $WhatIfEnabled as a boolean to the array, it fails with the below array

Additional content found in JSON reference object. A JSON reference object should only have a $ref property. Path 'parResourceLockConfig.defaultValue'.

From my understanding we can pass WhatIf as a switch to New-AzResourceGroupDeployment or any other Azure deployment command, but this way of passing it as a paramteer with boolean value is failing.

Please provide the correlation id associated with your error or bug.

The issue does not allow the pipeline/command to reach Azure deployments. It fails at the point we run a powershell command.

What was the expected outcome?

A way of using WhatIf with the existing setup

Relevant log output

No response

Check previous GitHub issues

Code of Conduct

kmridha92 commented 3 months ago

Found https://github.com/Azure/ALZ-Bicep/wiki/KnownIssues