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

  1. Sign in to the Azure Portal.

  2. In the left-hand menu, navigate to Microsoft Entra ID.

  3. Under Manage, select App registrations.

  4. Click + New registration at the top.

    New app registration
  5. Enter a name for your application, for example, MyAppPerfectScale.

  6. Choose the supported account type. Typically, a Single tenant is used.

  7. Click Register.

    New app registration form
  8. After registering, you’ll be redirected to the application overview page.

    1. Copy the Application (client) ID – this is your azure_client_id.

    2. Copy the Directory (tenant) ID – this is your azure_tenant_id.

    Credentials

How to get client_secret

  1. In the application’s Certificates & secrets section, go to Client secrets.

  2. Click + New client secret.

    New client secret
  3. Add a description, for example, Secret for PerfectScale, and set an expiry period as needed.

  4. Click Add.

    Add a client secret
  5. ‼️Copy the Value (your azure_client_secret) immediately, as it will only be displayed once‼️

How to get client_subscription

  1. In the Azure Portal, navigate to Subscriptions in the left-hand menu.

  2. Select the subscription you want to use.

  3. Copy your Subscription ID (azure_client_subscription) from the overview page.

    Subscription ID

How to grant permissions to your application

Ensure you provide PerfectScale with the necessary permissions, as this step is mandatory.

  1. In the Azure Portal, navigate to Subscriptions in the left-hand menu.

  2. Select the subscription you want to use.

  3. In the left-hand menu, choose Access Control (IAM).

    Access control
  4. Navigate to Role assignments.

  5. Press + Add and choose Add role assignment.

    Add role assignment
  6. In the Role section, select Reader role and click Next.

    Reader role
  7. 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
  8. 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.

Azure profile from the settings

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 from the overview

Azure profile configuration

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.

Wrong Azure profile configuration

🛠️ 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.

Applying a single Azure profile to the cluster

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.

Applying Azure profile to multiple clusters

Last updated