Integrate your Microsoft Azure account without data filtering

You must create a Microsoft Azure integration for cost management from the Integrations page and configure your Microsoft Azure account to allow cost management access.

Note
  • If you want to create a filtered Azure integration, do not complete the following steps. Instead, go to Creating a filtered Microsoft Azure integration.

To create an Azure integration, complete the following tasks:

  1. Create a storage account and resource group.
  2. Choose the appropriate scope for your cost export.
  3. Configure Storage Blob Data Reader and Cost Management Reader roles for access.
  4. Schedule daily cost exports.

Azure is a third-party product and its UI and documentation can change. The instructions for configuring third-party integrations are correct at the time of publishing. For the most up-to-date information, see the Microsoft Azure documentation.

Select a data collection scope and configure role-based access

In the Add a cloud integration wizard, you must select a scope to determine the level at which your cost data is collected and exported. If your scope requires the Billing account reader role, you must manually configure it in the Azure portal.

The scope that you select determines where role-based access control permissions are applied. The most common Scope selection in the wizard is Subscription.

The following list maps which role you need for each Scope selection:

Cost Management Reader Azure RBAC role:

  • Subscription
  • Resource group
  • Management group

Billing account reader Azure RBAC role:

  • Billing account
  • Billing profile
  • Invoice section
  • Enrollment account

If your scope requires the Cost Management reader role, you can run the commands as they appear in the documentation. If your scope requires the Billing account reader role, see Assign Azure roles in the Azure portal to learn how to manually configure the role in the Azure portal.

Add your Microsoft Azure account as an integration

Add your Microsoft Azure account as an integration so cost management can process the cost and usage data.

Before you begin

You must have a Red Hat user account with Cloud Administrator entitlements.

Procedure

  1. In cost management, navigate to Settings MenuSettings icon > Integrations > Cloud tab and click Add integration.
  2. In the Add a cloud integration wizard, select Microsoft Azure and click Next.
  3. Enter a name for your integration and click Next.
  4. In the Select application step, select Cost management and click Next.
  5. In the Specify cost export scope step, select I am OK with sending the default data to Cost Management. If you are registering RHEL usage billing, select Include RHEL usage.
  6. Select the scope of your cost data export from the menu and copy the generated command.
  7. In your Microsoft Azure account, open Cloud Shell, run the command, and copy the returned value.
  8. In cost management, return to the Specify cost export scope step, paste the value into Cost export scope, and click Next.

What to do next

Verify your Cost export scope:

In the Add a cloud integration wizard, verify that the cost export scope value appears in the Cost export scope field.

You will continue using the wizard in the following sections.

Store cost data with a Microsoft Azure Resource Group and storage account

Create a storage account in Microsoft Azure to house your cost data and metrics. In the Add a cloud integration wizard in cost management, enter the storage account name in the corresponding fields.

Before you begin

You must have a Red Hat user account with Cloud Administrator entitlements.

Note
Your storage account must allow public network access for Cost Management to retrieve exported data. If your storage account uses private endpoints or restricted virtual networks, you must enable Red Hat's IP addresses in your firewall and virtual network settings. For the list of allowed IP addresses to add to your Azure private storage account, see IP allowlist for Red Hat Hybrid Cloud Console and Red Hat Lightspeed notifications and integrations.

Procedure

  1. In your Microsoft Azure account, search for storage, click Storage accounts, and click Create.
  2. On the Create a storage account page, in the Resource Group field, click Create new, enter a name (for example, cost-data-group), and click OK.
  3. In Instance details, enter a name in the Storage account name field (for example, costdata).
  4. Copy the resource group and storage account names for later use.
  5. Click Review, review the storage account details, and click Create.
  6. In cost management, navigate to the Add a cloud integration wizard, paste the resource group and storage account names into Resource group name and Storage account name, and click Next.

What to do next

Verify your storage account:

In your Microsoft Azure account, verify that the new storage account appears in the Storage accounts list with a status of Available.

Configure a daily Microsoft Azure data export schedule

Next, set up an automatic export of your cost data to your Microsoft Azure storage account so that cost management can retrieve your data daily.

Procedure

  1. In your Microsoft Azure account, enter "cost exports" in the search bar, click the result, and click Create.
  2. Under Select a template, click Cost and usage (actual) to export your standard usage and purchase charges.
  3. Follow the Azure wizard steps:
    • Select the subscription and storage account that you created in the previous sections.
    • Set Format to CSV.
    • Set Compression type to None or Gzip.
  4. Review the information, save the export name and directory for later reference, and click Create.
  5. In cost management, return to the Add a cloud integration wizard, complete the Daily export fields, and click Next.

What to do next

Verify your export schedule:

In your Microsoft Azure account, verify that the export appears in the Cost exports list with a status of Active.

You will continue using the wizard in the following sections.

Add your Microsoft Azure subscription ID to the cost management integration wizard

Find your subscription_id in the Microsoft Azure Cloud Shell and add it to the Add a cloud integration wizard in cost management.

Procedure

  1. In your Microsoft Azure account, open Cloud Shell and run the following command:
    az account show --query "{subscription_id: id }"
  2. Copy the returned subscription_id value:

    Example response:

    {
        "subscription_id": 00000000-0000-0000-000000000000
        }
  3. In cost management, navigate to the Subscription ID field of the Add a cloud integration wizard, paste the value, and click Next.

What to do next

Verify your subscription ID:

In the Add a cloud integration wizard, verify that the subscription ID appears in the Subscription ID field.

Create Microsoft Azure roles for Red Hat access

To grant Red Hat access to your data, you must configure dedicated roles in Microsoft Azure. If you have an additional resource under the same Azure subscription, you might not need to create a new service account.

Procedure

  1. In cost management, navigate to the Roles section of the Add a cloud integration wizard and copy the az ad sp create-for-rbac command.
  2. In your Microsoft Azure account, open Cloud Shell, paste and run the command.
  3. Copy the returned values for client ID, secret, and tenant:

    Example response:

    {
        "client_id": "00000000-0000-0000-000000000000",
        "secret": "00000000-0000-0000-000000000000",
        "tenant": "00000000-0000-0000-000000000000"
    }
  4. In cost management, return to the wizard and paste the values into their corresponding fields on the Roles page.
  5. Copy the second az role assignment command that is generated from the wizard.
  6. In Microsoft Azure, return to the Cloud Shell prompt, paste and run the command to create a Cost Management Reader role.
  7. In cost management, return to the wizard, click Next, review the information, and click Add.

What to do next

Verify your integration:

In cost management, navigate to Settings Menu

Settings icon
> Integrations and verify that your Microsoft Azure integration appears in the list with a status of Available.

You have now successfully created an unfiltered integration. Do not follow the instructions in Creating a filtered Microsoft Azure integration.