This article is the first one in my practical FinOps for Azure series.

In the previous article, I introduced the FinOps Foundation and the idea behind FinOps: managing cloud costs isn’t simply about reducing the Azure bill. It’s about making better decisions about how we use cloud resources and making sure that our spending brings value to the business.

But before we can optimize anything, we need to answer a very simple question:

What do we actually have in our Azure environment?

This sounds obvious, but in larger environments the answer is often more complicated than expected.

Resources are constantly being created, migrated, resized, renamed, and decommissioned. Different teams create resources for different projects, and over time it becomes increasingly difficult to maintain a complete picture of the environment.

And this is where a basic Azure inventory becomes extremely useful.

Why inventory matters for FinOps

An inventory doesn’t directly reduce your Azure bill. It does something equally important: it gives you visibility.

Without visibility, it’s difficult to identify:

  • resources that are no longer needed,
  • resources that are not attached to anything,
  • oversized virtual machines,
  • resources without an owner,
  • resources deployed in unexpected locations,
  • and potential optimization opportunities.

For example, you might discover that your subscription contains hundreds of managed disks. The inventory itself doesn’t tell you which ones are generating unnecessary costs.

But it gives you the idea where to start.

Building an Azure Inventory

There are many ways to build an Azure inventory. For this series, I decided to create a PowerShell script that runs as an Azure Automation Runbook.

The Runbook scans your Azure subscriptions, collects information about the resources, and saves the results as a CSV file in an Azure Storage Account.

The inventory includes information such as:

  • Subscription
  • Resource Group
  • Resource Name
  • Resource Type
  • Location
  • VM Size
  • Number of CPUs
  • Memory
  • Disk information
  • Network information

The collected data can then be used to identify potential optimization opportunities and investigate resources that may no longer be required.

Prerequisites

The Runbook uses a managed identity to access Azure, so the identity needs appropriate permissions in the environment.

Before running the script, you need to create a Storage Acoount and provide:

  • Subscription ID — the subscription in which your Storage Account is located
  • Resource Group name — the resource group containing the Storage Account
  • Storage Account name — the Storage Account where the inventory CSV will be saved

The Runbook’s managed identity also needs permission to read resources in the subscription being scanned and permission to write data to the Storage Account.

Make sure both sets of permissions are configured before running the Runbook.

Running the Inventory

Once configured, the Runbook can be scheduled to run regularly and generate an updated inventory automatically. This is particularly useful in larger environments where manually maintaining an inventory would quickly become difficult.

Running the inventory on a regular basis also gives you a consistent source of information that can be used for the next steps of your FinOps activities.

The Script

The PowerShell script is available on my GitHub:

GitHub: https://github.com/pstopka-tech/FinOps.git

You can use it as a starting point and adjust the collected information to fit your own environment.

What’s next?

Once we know what resources exist in our environment, the next step is to look for resources that may no longer be needed.

In the next article, we’ll take a look at unattached managed disks—a common example of resources that can remain in an Azure subscription long after their original purpose has disappeared. They are easy to overlook, but they continue to generate storage costs.

And that’s a good place to start looking for some quick FinOps wins.

Leave a Reply

I’m Pati

Welcome to my corner of the internet dedicated to Microsoft Azure. Here, I invite you to join me on a journey into technology — exploring cloud services, sharing practical tips, and uncovering how Azure shapes the way we work and build solutions. Whether you’re just starting your cloud adventure or already deep into the Azure universe, this space is all about learning, inspiration, and growing together.

Let’s connect