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

Adding Support for Filtering Specific Subscription Id's to Include in ChildResource Discovery #880

Closed Jefajers closed 5 months ago

Jefajers commented 5 months ago

Overview/Summary

This PR adds a new setting called Core.SubscriptionsToIncludeChildResource with a default value or ["*"].

If you have a need to specify which subscription id's AzOps limits child resource discovery to, specify the desired subscription id or id's ["66d96157-55b3-47f3-b9a1-171778f99f0e","8b03299b-5880-4b2e-b026-e24484110151"] .

This PR fixes/adds/changes/removes

  1. Changes Frequently-Asked-Questions.md
  2. Changes Settings.md
  3. Changes Core.ps1
  4. Changes Get-AzOpsResourceDefinition.ps1
  5. Changes Repository.Tests.ps1
  6. Changes azuredeploy.jsonc
  7. Changes Functional.Tests.ps1

Breaking Changes

N/A

Testing Evidence

This logic has been manually tested in addition to this PR also contains an added automated testing step to ensure that the subscription Id filter behaves as intended.

As part of this Pull Request I have

Jefajers commented 5 months ago

@jsandquist, what do you think about this addition based on our previous dialog?

jsandquist commented 5 months ago

Great work - I'll test it out in my environment.

jsandquist commented 5 months ago

Big thumbs up for this feature - works as expected when tested in my environment. Thank you! :-)