Connecting Azure Cost Management
Step-by-step guide on how to enable Azure Cost Management
In order to provide PerfectScale with access to your Azure pricing using default authentication with the Azure SDK, several environment variables should be passed:
azure_client_id
azure_tenant_id
azure_client_secret
azure_client_subscription
PerfectScale has created a detailed guide to help you access the credentials effortlessly.
How to get client_id and tenant_id
Sign in to the Azure Portal.
In the left-hand menu, navigate to Microsoft Entra ID.
Under Manage, select App registrations.
Click + New registration at the top.
New app registration Enter a name for your application, for example, MyAppPerfectScale.
Choose the supported account type. Typically, a Single tenant is used.
Click Register.
New app registration form After registering, you’ll be redirected to the application overview page.
Copy the Application (client) ID – this is your
azure_client_id
.Copy the Directory (tenant) ID – this is your
azure_tenant_id
.
Credentials
How to get client_secret
In the application’s Certificates & secrets section, go to Client secrets.
Click + New client secret.
New client secret Add a description, for example, Secret for PerfectScale, and set an expiry period as needed.
Click Add.
Add a client secret ‼️Copy the Value (your azure_client_secret) immediately, as it will only be displayed once‼️
How to get client_subscription
In the Azure Portal, navigate to Subscriptions in the left-hand menu.
Select the subscription you want to use.
Copy your Subscription ID (
azure_client_subscription
) from the overview page.Subscription ID
How to grant permissions to your application
In the Azure Portal, navigate to Subscriptions in the left-hand menu.
Select the subscription you want to use.
In the left-hand menu, choose Access Control (IAM).
Access control Navigate to Role assignments.
Press + Add and choose Add role assignment.
Add role assignment In the Role section, select Reader role and click Next.
Reader role In the Members section, click Select Members and use the right-hand search menu to find your application (e.g., “MyApp”).
You can also search the application using Object ID.
Application search Click Review + Assign.
Azure profile
Once you have all the credentials needed, you need to create an Azure Profile and apply it to the desired cluster.
🛠️ How to create Azure profile
There are two options for creating a Profile: from the Settings tab or directly from the Overview.
From the Settings tab
Go to the Settings
tab on the left panel -> select Pricing
-> click the +Add Profile
button -> select Azure
-> name the profile and put the needed values in the relevant fields -> click Save
button.

From the Overview tab
Go to the Overview
tab on the left panel -> find the cluster to which you want to apply the Azure Profile
and click gear
button -> go to Customizations
-> click on Add New Profile
in the Pricing Profile
drop-down list -> select Azure
type -> name and configure your profile -> click the Save And Apply
button -> click the Save Changes
button.

Azure profile configuration

azure_subscription_id
: The unique identifier assigned to your Azure subscription that allows PerfectScale to interact with Azure resources within your subscription.
azure_tenant_id
(Directory (tenant) ID): The unique identifier of the organization in Azure Active Directory that allows Azure to manage authentication within the specific directory.
azure_client_id
(Application (client) ID): The unique identifier assigned to your application that allows it to access Azure resources.
azure_client_secret
: The secret key that allows the application to authenticate to Azure AD and get an access token to Azure resources.
Azure configuration verification
To verify if Azure Cost Management is configured properly, click the Test Integration button.
🟢 When the configuration is correct, you will see the message Azure Configured Correctly.
🔴 In case of Azure Configured Wrongly response, check the Show integration failure details
dropdown and fix the displayed issues.

🛠️ How to apply Azure profile
Apply to a single cluster
To apply Azure Profile
to the cluster, go to the Overview
tab on the left-hand panel -> find the cluster to which you want to apply the Azure Profile
and click gear dots
button -> go to Customizations
-> select the needed profile in the Pricing Profile
drop-down list.

Apply to multiple clusters
To apply the profile to multiple clusters from a single view, use the Manage Assignments
feature.
Go to the Settings
tab on the left-hand panel -> select the Pricing
-> click the Manage Assignments
button -> apply the profile for the needed clusters -> click the Save Changes
button.

Last updated