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
814 stars 293 forks source link

Added support for -DoAzureConsumptionPreviousMonth #227

Closed JanElholm closed 3 months ago

JanElholm commented 3 months ago

Azure Governance Visualizer (6.4.3) run identifier: '7359F93897095F617BC027CE92431EDF32D350F657E902772331BDFA441DD2298358BF5F45B437CCF83A4FB797E214D59854D275421CD370321E2BCC4ADC1A6D'

JulianHayward commented 3 months ago

hey @JanElholm looks great!

One ask before I merge, would you also please update the ado variables?

May I challenge the scenario of using DoAzureConsumptionPreviousMonth - that would basically mean that in the scenario where you execute azgvz per default schedule that e.g. on 31st of March, all March long executions did the same query with exact same results to have the consumption data from February? Can you elaborate a bit on the use case please?

JanElholm commented 3 months ago

Hey @JulianHayward

Ado variables are updated now

Yes, we only aim at running the AzGovViz once a month (second or third day in the month) and would like to use it for reporting on the consumption from the previous month. Another option is to run AzGovViz with a consumption duration of 30 days, but that will not be precise when months have various length. Hope that explains our use case

JulianHayward commented 3 months ago

all right, understood. Please don´t set DoAzureConsumptionPreviousMonth as default (in the variables file you set it to true)

JanElholm commented 3 months ago

Sorry, changed to false as default now

JulianHayward commented 3 months ago

sorry, could have been guiding better ..

this is how it should be:

  - name: DoAzureConsumptionPreviousMonth
    # Switch | example: value: true
    value:
JanElholm commented 3 months ago

Ah ok - thanks - updated now

JulianHayward commented 3 months ago

@JanElholm thanks for contribution