JulianHayward / Azure-MG-Sub-Governance-Reporting

Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
817 stars 295 forks source link

Orphaned Resources - cost saving - stopped and not deallocated VMs #171

Closed TimWanierke closed 1 year ago

TimWanierke commented 1 year ago

AzGovViz run identifier: BE46DE4541B81741E494183AE5521C166266757339C9685EECCFE252C476BF265EB7AF55D185B1F2B7210A58E15DD8C45405C5A570DEA9308F911CFD8DB49F84

JulianHayward commented 1 year ago

great stuff. As a new intent 'cost savings - stopped but not deallocated VM' is introduced, some sections need to be aligned accordingly. Please check for occurrences of -eq 'cost savings' and replace with e.g. -like 'cost savings*'.
As a result we should see related cost for stopped VMs in the HTML file (TenantSummary/Subscriptions, Resources & Defender/Orphaned Resources) and the *_ResourcesOrphaned.csv file.

TimWanierke commented 1 year ago

Updated the code with -like 'cost savings*'. AzGovViz identifier: BE46DE4541B81741E494183AE5521C166266757339C9685EECCFE252C476BF265EB7AF55D185B1F2B7210A58E15DD8C45405C5A570DEA9308F911CFD8DB49F84

TimWanierke commented 1 year ago

Another small update on this PullRequest. I've adjusted the Query for "orphaned resources" - stopped VMs

AzGovViz indentifier: BE46DE4541B81741E494183AE5521C166266757339C9685EECCFE252C476BF265EB7AF55D185B1F2B7210A58E15DD8C45405C5A570DEA9308F911CFD8DB49F84

JulianHayward commented 1 year ago

super, thanks!