[Developer's community]

Azure Resource Inventory (ARI)

As cloud environments grow more complex, keeping track of every resource within an Azure subscription can quickly become overwhelming. Whether you're managing a small deployment or an enterprise-scale environment, the need for a comprehensive overview of your resources is essential for maintaining control, ensuring compliance, and optimizing costs. This is where Azure Resource Inventory (ARI) comes into play.

ARI is an open-source tool developed by Microsoft that simplifies the task of gathering, analyzing, and visualizing information about your Azure resources. It provides a single pane of glass to view all the assets within your Azure environment, helping you manage your infrastructure more effectively. In this blog, we'll explore the need for ARI, its key benefits, and how it can streamline your cloud operations.

Azure Resource Inventory (ARI) is a powerful tool designed to help you gain visibility into your Azure resources. Here are some essential aspects you need to know:

  1. Comprehensive Inventory Collection. ARI gathers detailed information about all resources within your Azure subscriptions. This includes virtual machines, storage accounts, networking components, databases, and more. By creating a comprehensive inventory, ARI enables you to have a clear picture of everything that is running in your environment

  2. Customizable and Extensible. The tool is highly customizable, allowing you to tailor the data collection process to fit your specific needs. ARI's modular design means you can easily extend its capabilities by adding custom queries or integrating it with other tools in your ecosystem

  3. Security and Compliance. One of the primary advantages of ARI is its ability to support security and compliance efforts. By providing a detailed view of your resources, ARI helps identify potential vulnerabilities, ensure that configurations adhere to best practices, and track changes over time

  4. Cost Management. ARI also plays a crucial role in cost management. With a clear understanding of what resources are deployed and how they are being used, you can identify unused or underutilized assets and optimize your spending accordingly

  5. User-Friendly Reporting. ARI generates reports that are easy to understand and share with stakeholders. These reports provide insights into resource allocation, usage patterns, and potential areas for improvement, making it easier to communicate the state of your environment to both technical and non-technical audiences

  6. Open Source and Community-Driven. As an open-source tool, ARI benefits from contributions and feedback from the community. This ensures that the tool remains up-to-date with the latest Azure features and evolves to meet the needs of its users

Before diving into the powerful features of Azure Resource Inventory (ARI), you'll need to set it up locally. The process is straightforward and involves a few key steps: installing dependencies, cloning the repository, and running the tool. Here's a step-by-step guide to help you get started:

1. Prerequisites

Before you begin, make sure you have the following installed on your local machine:

  • Git: You’ll need Git to clone the ARI repository. If you haven’t installed it yet, you can download it from here
  • .NET SDK: ARI is built on .NET, so you’ll need the .NET SDK installed. You can download it from here
  • Azure CLI: The Azure CLI is required to authenticate and interact with your Azure subscriptions. You can get the latest version here

2. Clone the ARI Repository

Once the prerequisites are installed, the next step is to clone the ARI repository from GitHub. Open your terminal or command prompt and run the following command:

git clone https://github.com/microsoft/ARI.git

This command will create a local copy of the ARI repository on your machine.

3. Install other dependencies

Execute the following commands in order, as outlined below (make sure you're running PowerShell as an Admin):

Install-Module -Name ImportExcel
az extension add --name account
az extension add --name resource-graph
az config set core.enable_broker_on_windows=false

4. Run ARI script

Get your Azure Tenant ID (which can be found on the Azure Entra landing page). Navigate to a project repository you cloned from GitHub in Step 2, and you should see 'AzureResourceInventory.ps1' script there. If you run this script for all subscriptions attached to your Azure tenant, you won't need to specify a subscription ID, and the command will look like this:

.\AzureResourceInventory.ps1 -TenantID <your_tenent_id_here> -QuotaUsage

It'll ask you to authenticate, and once you do, it will start generating a report. For Windows users, the report (along with other artifacts) will be dropped to `C:\AzureResourceInventory`.

Excel report:

This report contains useful information about the service your organization utilizes in Azure Cloud. It empowers DevOps engineers to maintain control, optimize costs, and ensure compliance across their Azure environments efficiently

Comments (1) -

  • Exactly wahat I was looking for!

Add comment

Loading