Azure / AzOps

AzOps is a PowerShell module which deploys (Push) ARM Resource Templates & Bicep files at all Azure scope levels and exports (Pull) ARM resource hierarchy.
https://aka.ms/AzOps
MIT License
384 stars 163 forks source link

PolicySetDefinition empty defaultValue is removed #874

Closed jleechpe closed 5 months ago

jleechpe commented 5 months ago

Describe the bug

PolicySetDefinitions require a "defaultValue": for parameters. In cases where there is no default the json returned is "defaultValue": "" which is then omitted by the jq template.

Trying to update a policysetdefinition that was returned with empty values fails because it is missing the default values for the parameters. Adding them into the template is a work-around since the next Invoke-AzOpsPull will remove them once again.

Jefajers commented 5 months ago

Hi @jleechpe, thanks for reporting this.

I am able to reproduce the scenario and will pursue remediation for policy definitions and policy set definitions.