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
857 stars 308 forks source link

Calculate time span for AzureConsumptionPeriod when using `-DoAzureConsumptionPreviousMonth` #250

Closed ReneRebsdorf closed 2 months ago

ReneRebsdorf commented 3 months ago

This commits ensures the correct amount of days data is collected over is written in the generated reports. Before this commit, when using the DoAzureConsumptionPreviousMonth the AzureConsumptionPeriod param was no longer technically relevant, but was used in reports, e.g. it would read as the last X amount of days was collected based on the param value provided, while the actual amount of days depends on the length of the previous month. (between 28 - 31 days).

With this commit the correct amount of days is used throughout the reports, which lead to some other phrasing changes (e.g. it is not necessarily the 'last' X days the report is collected over).

Run identifier: A0BB373FB13C57D8EFFF319E87814FD7C2BBCB46F5D1FF016383F3CF00DB85DF56D77A4E1E58FE095FDFD71C01A571C0A5EFB6429C241E9AA17BBE875DDFCAB2