Chapter 1. Creating a Microsoft Azure integration To add an Microsoft Azure account to hybrid committed spend, you must add it as a integration from the Red Hat Hybrid Cloud Console user interface and configure Microsoft Azure to provide metrics. To configure your Microsoft Azure account to be an hybrid committed spend integration, you must complete the following tasks: Create a storage account and resource group. Configure Storage Account Contributor and Reader roles for access. Create a function to filter the data you want to send to Red Hat. Schedule daily cost exports to a storage account accessible to Red Hat. If you are using RHEL metering, after you integrate your data with cost management, go to Adding RHEL metering to a Microsoft Azure integration to finish configuring your integration for RHEL metering. Note Because third-party products and documentation can change, instructions for configuring the third-party integrations provided are general and correct at the time of publishing. For the most up-to-date information, see the Microsoft Azure's documentation . Add your Microsoft Azure integration to hybrid committed spend from the Integrations page . 1.1. Adding a Microsoft Azure account Add your Microsoft Azure account as an integration so hybrid committed spend can process the cost and usage data. Prerequisites You must have a Red Hat user account with Cloud Administrator entitlements. In cost management: Click Settings Menu > Integrations . In the Cloud tab, click Add integration . In the Add a cloud integration wizard, select Microsoft Azure and click . Enter a name for your integration and click . In the Select application step, select Hybrid committed spend and click . 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 . Otherwise, proceed to the step. Select the scope of your cost data export from the menu. You can export data at the subscription level or by other scopes in your subscription. Copy the command that is generated. In your Microsoft Azure account : Click Cloud Shell and run the command that you copied from cost management. Copy the returned value. In cost management: In the Specify cost export scope step, paste the value that you copied from Microsoft Azure into Cost export scope . Click . You will continue using the wizard in the following sections. 1.2. Creating a Microsoft Azure resource group and storage account Create a storage account in Microsoft Azure to house your billing exports and a second storage account to house your filtered data. In your Microsoft Azure account : In the search bar, enter "storage" and click Storage accounts . On the Storage accounts page, click Create . In the Resource Group field, click Create new . Enter a name and click OK . In this example, use cost-data-group . In the Instance details section, enter a name in the Storage account name field. For example, use costdata . Copy the names of the resource group and storage account so you can add them to the Add a cloud integration wizard in Red Hat Hybrid Cloud Console and click Review . Review the storage account and click Create . In cost management: In the Add a cloud integration wizard, paste the resource group and storage account names that you copied into Resource group name and Storage account name . You will continue using the wizard in the following sections. 1.3. Creating a daily export in Microsoft Azure , set up an automatic export of your cost data to your Microsoft Azure storage account before you filter it for cost management. In your Microsoft Azure account : In the search bar, enter "cost exports" and click the result. Click Create . In Select a template , click Cost and usage (actual) to export your standard usage and purchase charges. Follow the steps in the Azure wizard: You can either create a new resource group and storage account or select existing ones. In this example, we use billingexportdata for the storage account and billinggroup for the resource group. You must set Format to CSV . Set Compression type to None or Gzip . Review the information and click Create . In cost management: Return to the Add a cloud integration wizard and complete the steps in Daily export Click . You will continue using the wizard in the following sections. 1.4. Finding your Microsoft Azure subscription ID Find your subscription_id in the Microsoft Azure Cloud Shell and add it to the Add a cloud integration wizard in hybrid committed spend. In your Microsoft Azure account : Click Cloud Shell . Enter the following command to get your Subscription ID: az account show --query "{subscription_id: id }" Copy the value that is generated for subscription_id . Example response { "subscription_id": 00000000-0000-0000-000000000000 } In cost management: In the Subscription ID field of the Add a cloud integration wizard, paste the value that you copied in the step. Click . You will continue using the wizard in the following sections. 1.5. Creating Microsoft Azure roles To grant Red Hat access to your data, you must configure dedicated roles in Microsoft Azure. If you already created a service principal in Microsoft Azure, do not create another one, skip to step 4 and use it to share your Tenant (Directory) ID , Client (Application) ID , and Client secret values with hybrid committed spend. Procedure In the Add a cloud integration wizard, on the Roles step, copy the generated az ad sp create-for-rbac command from the wizard to create a service principal with the Cost Management Storage Account Contributor role. In your Microsoft Azure account , click Cloud Shell . Paste the command you copied in the earlier step in the cloud shell prompt. Copy the Tenant (Directory) ID , Client (Application) ID , and Client secret values and paste them into the Roles step of the Add a cloud integration wizard. Copy the second generated az role assignment create command from the wizard and paste it in the cloud shell prompt to create a Cost Management Reader role. In the Add a cloud integration wizard, click . Review the information you provided in the wizard and click Add .

Commands:
az account show --query "{subscription_id: id }"
{ "subscription_id": 00000000-0000-0000-000000000000 }