microsoft / finops-toolkit

Tools and resources to help you adopt and implement FinOps capabilities that automate and extend the Microsoft Cloud.
https://aka.ms/finops/toolkit
MIT License
305 stars 106 forks source link

Runbook Export-PriceSheetToBlobStorage generates a CSV that contains only column headings #1099

Closed Paperiris closed 1 week ago

Paperiris commented 1 week ago

I have installed the Optimization Engine and configured the Managed Identity to have access to the Enterprise Agreement.

Image

🐛 Problem

When running the Export-PriceSheetToBlobStorage job, it completes successfully and generates a CSV to the Storage Account. However the CSV only contains the column headings and no other information.

👣 Repro steps

I go to the Automation Account, select the Job named 'Export-PriceSheetToBlobStorage' and leave all values empty when prompted. The job runs and completes successfully after around 5 minutes.

Image

When browsing to the CSV in the Storage Account it has a size of 155 bytes and when opened contains only the column headings.

Image

Image

🤔 Expected

Price Sheet information to be populated in the CSV file

ℹ️ Additional context

This is an Enterprise Agreement with 30+ subscriptions As far as I can tell, all necessary permissions have been assigned to the Automation Account Managed Identity (Reader at Root MG, Enrollment Reader, Bill Reader, Global Reader in AAD) I have reviewed issues #842 and #995 however am still facing the issue

helderpinto commented 1 week ago

Thank you for reporting this issue and for all the details, @Paperiris. The reason you're getting no data is because you configured region filters with the Azure Resource Manager format, i.e., australiaeast,australiasoutheast. You have to use the pricesheet format instead, which should be AU East,AU Southeast.

Paperiris commented 1 week ago

Thanks @helderpinto, that has fixed the issue and I've successfully generated the price sheet CSV. Thanks for such a quick response, much appreciated.