Fix policydefinition and policysetdefinition removal of 'empty' conditional logic #811
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview/Summary
This PR fixes #810 by changing the Jq filtering logic during template removal composition of
policydefinition
andpolicysetdefinition
resources.Current logic produces a clean output by removing all empty values. This has negative impact on policyDefinitions with conditional logic that might use empty values. The logic change in this PR ensures that empty vaules belonging to keys matching Azure Policy conditions are excluded from removal.
This is a regression oversight introduced with version
AzOps 2.0.0
due to overhaul of filters.This PR also contains a bump in module dependency version
PSFramework 1.8.289
.This PR fixes/adds/changes/removes
AzOps.psd1
policyDefinitions.jq
policySetDefinitions.jq
template.parameters.jq
Breaking Changes
N/A
Testing Evidence
Manual tests have been performed without issues and here is a jq snippet of a policy definition with empty
description
field and empty conditions likenotEquals
example.As part of this Pull Request I have
main
branch