All onboarding guides

Microsoft Azure onboarding

Connect Microsoft Azure to CloudHiro.

Choose automated or manual setup, connect billing data, and configure the Azure access your CloudHiro features need.

Before you start

Review the setup paths before you begin. The automated script supports EA/MACC agreements only.

Keep the Cloud Shell open until you have copied the parameters and downloaded the PEM file.

Start setup
1

Choose your setup method

Use the automated process or create the service principal manually.

Choose one setup path

If the automated script completes successfully, use its returned parameters to register with CloudHiro. Use the manual sections below for manual setup or permissions the script could not add.
Automated setup — EA/MACC agreements
2

In Azure portal, open the Cloud Shell and switch to bash.

3

Run the python script and follow the instructions.

4

Once the onboarding script is done, follow the instructions at the end and use the parameters to register to CloudHiro.

5

Continue to the Register to CloudHiro section below.

Important Remarks

  • • The onboarding script supports only EA/MACC agreements.
  • • CSP (Cloud Solution Provider) agreements - you will need to ask the CSP to enable you to buy reservations on your own in your subscriptions. More details here
  • • Do not close the Cloud Shell until you have copied all the parameters and downloaded the pem file.
  • • If you do not have the required permissions, the onboarding process will notify at the end and you will need to add those permissions manually.
Manual setup — create a service principal

Creating a Service Principal

The following guide will show you how to set up your account to allow CloudHiro to access it in a secure manner. We will create a Service Principal for CloudHiro.

1

Use Azure CLI to set the active subscription:

az account set --subscription ""
2

Use Azure CLI to Create the Service Principal:

az ad sp create-for-rbac -n "CloudHiro" --create-cert
3

You should get a response similar to:

Creating a role assignment under the scope of "/subscriptions/"
{
  "appId": "XXX",
  "displayName": "CloudHiro",
  "fileWithCertAndPrivateKey": "/path/to/certificate/tmp123abc_v.pem"
  "name": "http://CloudHiro",
  "password": "YYY",
  "tenant": "ZZZ"
}
4

Please save the response. We will need some of the properties for the registration step.

2

Connect billing data

For manual setup: choose Method A (exports) or Method B (API).

There are two methods:

Method A - Traditional Billing Export

You control what CloudHiro can see, but billing data is available for up to 3 months in the past.

Method B - Billing API

CloudHiro can access up to 12 months of billing data in the past.

Method A - Billing Export

1
2

Create a storage account for CloudHiro to be able to read from.

3

Create billing exports at the highest level possible (billing account preferred). A total of 6 exports should be created:

Daily export - month to date:

  • Amortized cost (1)
  • Actual cost (2)

One-time export of the last 2 months:

  • Previous month: Amortized cost (3) & Actual cost (4)
  • 2 months ago: Amortized cost (5) & Actual cost (6)

Method B - Billing API

1

Just grant the"Enrollment reader" permission to the service principal - Add it manually.

3

Assign resource roles

For manual setup or permissions not added by the script.

1

You can use a role-assignment script provided by your CloudHiro contact from the Azure CLI to quickly assign the role to all subscriptions.

2

If you did not use the script, navigate to Subscriptions → Access Control (IAM) → Role Assignments. Add the following role assignments to the service principal:

Reader
Billing Reader

For the Storage accounts that hold all the billing exports:

Reader and Data Access
Storage Blob Data Reader
4

Configure Auto-RI management

Auto-RI is automated Reservation Management.

Auto-RI setup

These permissions enable management and purchases

Review the tenant-level and purchasing-subscription roles below for the Auto-RI setup.

Auto-RI is our automated Reservation Management.

1

Create a new subscription for our purchases. If you already have a subscription for purchases, you can use that one.

2

Grant Reservations Administrator and Savings plan contributor at the Tenant level. Azure's manual on how to add permissions at the tenant level -use this link

3

Grant Reservations Purchaser and Savings plan purchaser on the subscription you have created above.

4

Grant Reservations Reader and Savings plan reader at the tenant level to see all reservations purchased.

Please Note

  • • Auto-RI requires the billing export from the previous section (method A or B).
  • • IF you are working through a Cloud Solution Provider (CSP), you will need to ask the CSP to enable you to buy reservations on your own in your subscriptions. More details here
5

Add Log Analytics access

Add the data.read permission to the service principal’s app registration.

1

After creating the service principal, go to the app registration of the service principal created → API permissions → add a permission → APIs my organization uses → log analytics API → add data.read permission.

6

Register to CloudHiro

Keep your Client ID, tenant ID, and certificate ready.

1

Use the registration link provided by your CloudHiro contact. If using a reseller, use their provided link or add"?partner=[reseller-name]" to the URL.

2

You will need the following values from the previously saved response:

  • Client ID -"appId"
  • Certificate -"fileWithCertAndPrivateKey"
  • Tenant Id -"tenant"
3

After registering, confirm the email and login.

4

In CloudHiro go to System → Settings and update the Azure RI's subscription ID field.

7

Complete CloudHiro settings

Configure billing export and Azure-RI settings after registration.

2

Go to system→settings and update the four fields required for Bill CSV Location & the Azure RIs Subscription ID field. Update all at once. If you do not have a subscription ID, you can simply use 123 as a placeholder.

8

Review your setup with CloudHiro

Tick off each item as you complete it. Checkmarks apply to this page visit only.

Contact your CloudHiro representative to validate the connection and walk through your reports.

Permission reference — roles, scopes & purpose

Storage Blob Data Reader

Scope: Storage Account that holds the billing exports

The ability to list all blobs in that storage account (Billing - Method A - billing exports)

Enrollment reader

Scope: Billing Account

Ability to read billing data from API (Billing - Method B - API)

Reader

Scope: Subscriptions

The ability to list and get all resources and their properties

Monitoring Reader

Scope: Subscriptions

The ability to view metrics and see the usage of log analytics

Reader and Data Access

Scope: Storage Account that holds the billing exports

The ability to view the blobs' content

Log analytics API

Scope: App registration

Reach log analytics API and show how much each resource is sending to log analytics workspaces

Reservations Administrator

Scope: Tenant

The ability to view and manage the reservations at the Tenant level, so all reservations will be visible to CloudHiro. The ability to manage RIs correctly by splitting, exchanging, refunding, etc.

Reservations Purchaser

Scope: Purchasing Subscription

The ability to calculate the cost of the reservation and to purchase the reservation in that billing subscription

Reservations Reader

Scope: Tenant

The ability to see all reservations

Savings plan contributor

Scope: Tenant

The ability to view and manage savings plans at the Tenant level

Savings plan purchaser

Scope: Purchasing Subscription

The ability to purchase savings plans in the purchasing subscription

Savings plan reader

Scope: Tenant

The ability to see all savings plans