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
371 stars 158 forks source link

Fix File Pair Processing of Modify and Deletion Overlap #881

Closed Jefajers closed 2 months ago

Jefajers commented 2 months ago

Overview/Summary

This PR fixes #879 and similar patterns.

With this changed logic the module will check that whenever deployment jobs are constructed example: baseTemplate + parameterTemplate it will check that neither file is being deleted in the same push to the module. If there in an overlap the file targeted for deletion will be skipped when constructing deployment jobs.

Without this logic the module based on its current order of processing would unintentionally first re-process (deploy) the deleted file before proceeding with deletion.

This PR fixes/adds/changes/removes

  1. Changes Invoke-AzOpsPush.ps1
  2. Changes ConvertFrom-AzOpsBicepTemplate.ps1
  3. Changes Strings.psd1

Breaking Changes

N/A

Testing Evidence

Tests have been performed with the following combinations using both .json, parameters.json, bicep, bicepparams:

As part of this Pull Request I have