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

Adding Support for Single Template with Multiple Parameter Files #836

Closed Jefajers closed 6 months ago

Jefajers commented 7 months ago

Overview/Summary

This PR adds support for single template with multiple parameter file associations resulting in multiple deployments and closes #831.

The parameter file association allows for many-to-one relationships between parameter file and template and each relationship represents a unique deployment.

scope/
├── template.x1.bicepparam
├── template.x2.bicepparam
├── template.x3.parameters.json
└── template.bicep

This behavior's is controlled with three new settings Core.AllowMultipleTemplateParameterFiles, Core.DeployAllMultipleTemplateParameterFiles and Core.MultipleTemplateParameterFileSuffix read more in the wiki or head over to faq.

This feature is disabled by default, to enable this feature set Core.AllowMultipleTemplateParameterFiles to true.

It is optional to change Core.DeployAllMultipleTemplateParameterFiles, if you want changes made to the base template to be treated as separate deployments for each corresponding parameter file.

It is optional to change Core.MultipleTemplateParameterFileSuffix, if you want a different filename identifier than x update this setting as well.

This PR fixes/adds/changes/removes

  1. Changes Frequently-Asked-Questions.md
  2. Changes Settings.md
  3. Changes Initialize-AzOpsEnvironment.ps1
  4. Changes Invoke-AzOpsPush.ps1
  5. Changes Core.ps1
  6. Changes ConvertFrom-AzOpsBicepTemplate.ps1
  7. Changes New-AzOpsDeployment.ps1
  8. Changes Set-AzOpsWhatIfOutput.ps1
  9. Changes Strings.psd1
  10. Changes Repository.Tests.ps1
  11. Adds rtmultibase.bicep
  12. Adds rtmultibase.x123.parameters.json
  13. Adds rtmultibase.xabc.bicepparam
  14. Adds deployallrtbase.bicep
  15. Adds deployallrtbase.x123.parameters.json
  16. Adds deployallrtbase.xabc.bicepparam

Breaking Changes

  1. N/A

Testing Evidence

Automated testing included in PR and in additon to that manual testing has been performed with custom .bicep, .json, .parameters.json and .bicepparam files in conjunjtion with different Azure Policy deployments.

As part of this Pull Request I have

daltondhcp commented 7 months ago

🚀