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 Duplicate conflicting deployments with DeployAllMultipleTemplateParameterFiles #887

Closed Jefajers closed 1 week ago

Jefajers commented 3 weeks ago

Overview/Summary

This PR changes two key pieces to fix #886 and avoid incorrect recursive parameter discovery.

  1. Adjusts how the $deploymentName is derived at run-time. Ensuring that if the deployment job que contains overlapping deployments, we only process it once when they have matching deployment name and files.
    1. Addressing #886
  2. During recursive parameter discovery there was a possibility that a un-related file pair would have been discovered and queued for processing. This is not the intent so a step in the recursive process has been added to regex match the base name of any discovered files prior to any further processing.

This PR fixes/adds/changes/removes

  1. Changes Invoke-AzOpsPush.ps1
  2. Changes Repository.Tests.ps1
  3. Adds decoy.westeurope.bicep
  4. Adds decoy.westeurope.x123.parameters.json
  5. Adds deployallrt.westeurope.bicep
  6. Adds deployallrt.westeurope.x123.parameters.json
  7. Adds deployallrt.westeurope.xabc.bicepparam
  8. Adds deployallrt2.westeurope.bicep

Breaking Changes

  1. N/A

Testing Evidence

The logic has been tested according to the issue and an automated test has been added.

As part of this Pull Request I have