How to determine cost per blob?

Hugo 20 Reputation points
2023-08-08T09:06:31.8233333+00:00

Hi all.

I have a storage account with a single container. Files from multiple departments will be uploaded and I need to be able to determine the costs per department.

The Cost Analysis tool allows me to see the price per storage account, but I cannot get more granularity than that.

My idea was to:

  1. For each file, set a tag with the respective cost center.
  2. Find all blobs using the index tag
  3. Sum the size of all the blobs
  4. Calculate an approximate price using the pricing available here

This is doable, but it seems overengineering.

Is there another way of achieving the same? Please keep in mind that there's no option to have multiple storage accounts nor multiple containers.

Thank you.

Regards.

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,670 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,915 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 28,386 Reputation points Microsoft Employee
    2023-08-09T17:41:20.24+00:00

    Hi @Hugo

    I looked into this. From cost management portal view, I couldn't find anything that could provide that kind of granularity out of the box. I also didn't notice anything under the Storage Resource Provider REST API Reference that yield something helpful. Even blob inventory reports are done at the container level.

    Since your scenario doesn't allow you to utilize multiple containers, your use of blob index tags I would say is most prudent course of action.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.