finops-toolkit icon indicating copy to clipboard operation
finops-toolkit copied to clipboard

AOE - Workbook | Savings Plans Usage - Errors in tabs

Open psilantropy opened this issue 1 year ago â€ĸ 6 comments

🐛 Problem

Workbook | Savings Plans Usage reports 2 errors in 2 tabs.

  • Full Usage Report

'project' operator: Failed to resolve scalar expression named 'ExpiryDate_t'...

  • Unused Savings Plan Analysis - Used Savings Plan Details

'project' operator: Failed to resolve scalar expression named 'ExpiryDate_t'...

📷 Screenshots

example

â„šī¸ Additional context

  • EA Customer
  • Single Savings Plan
  • Savings Plan in Expiring State

psilantropy avatar Oct 01 '24 23:10 psilantropy

Thanks for reporting this issue, @psilantropy. There seems to be a schema difference between EA/MCA savings plans API responses. We will investigate a solution to normalize both and hopefully share a tentative fix soon.

Tagging @flanakin for awareness.

helderpinto avatar Oct 02 '24 13:10 helderpinto

Hi, @psilantropy.

There is a PR (#1047) that will fix this issue. If you want to try out the fix before the release, you just have to make sure you are running AOE on the latest version (September release) and then update the Export-SavingsPlansUsageToBlobStorage runbook with this code. After the next Savings Plans export+ingest cycle, the Savings Plans workbook should load correctly.

If you are not on the latest AOE release, check here how to upgrade.

helderpinto avatar Oct 06 '24 10:10 helderpinto

Thanks. Updated just now, but missed the job by 30 minutes. I will let it run as per schedule and give you an update tomorrow. Appreciate it :)

psilantropy avatar Oct 07 '24 01:10 psilantropy

Hi, @helderpinto - This ended up generating an error. (I am on the latest AOE) Last stage of runbook was Uploading CSV to Storage

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: This request is not authorized to perform this operation using this permission. HTTP Status Code: 403 - HTTP Error Message: This request is not authorized to perform this operation using this permission. ErrorCode: AuthorizationPermissionMismatch ErrorMessage: This request is not authorized to perform this operation using this permission. RequestId:xxxxxxx

image

Just doing a few tests, checking logs now. But not getting much more info so far. Next run-time is in about 5 hours.

psilantropy avatar Oct 08 '24 19:10 psilantropy

Hi, @psilantropy. As I stated above, before updating the runbook code, you must upgrade AOE to the latest release. Authentication to Storage by the Automation Account identity is now Entra ID-based. The error you got is because the AOE identity does not have the Storage Blob Data Contributor role on the Storage Account.

helderpinto avatar Oct 08 '24 19:10 helderpinto

Hi, @psilantropy. As I stated above, before updating the runbook code, you must upgrade AOE to the latest release. Authentication to Storage by the Automation Account identity is now Entra ID-based. The error you got is because the AOE identity does not have the Storage Blob Data Contributor role on the Storage Account.

Sorry I misinterpreted that and thought I was on the latest version. I'll review now and let you know. Thank you.

psilantropy avatar Oct 08 '24 19:10 psilantropy