Attribute serverless usage with budget policies

Important

This feature is in Public Preview.

This article explains how to use budget policies to enforce cost attribution tags on serverless compute workloads.

Budget policies consist of tags that are applied to any serverless compute activity incurred by a user assigned to the policy. The tags are logged in your billing records, allowing you to attribute select serverless usage to specific budgets. For more on creating budgets, see Use budgets to monitor account spending.

Budget policy permissions

You must be a workspace admin to create budget policies. Non-admins can manage select policies if they are assigned the Budget policy: Manager permissions on the policy.

Workspace admins can manage and view budget policies they created or the ones they have explicit permissions on. To view and manage all policies for a given account, the workspace admin must additionally have the Billing admin account-level role. This role is assigned in the account console.

By default, new policies can only be accessed by the policy creator and users with the billing admin role.

Because budget policies are account-level resource objects, managers can manage policies from any workspace they have access to.

Create a budget policy

Budget policies are managed in your workspace admin settings. To create a new budget policy:

  1. Click your username in the top bar of the Azure Databricks workspace and select Settings.
  2. Click Compute.
  3. Next to Budget policies, click Manage.
  4. Click Create.
  5. Add a name and your desired tags then click Create.

Create budget policy UI

Manage budget policy permissions

There are two types of permissions you can grant on your budget policies:

  • User: A budget policy user can select the policy whenever they create a notebook, job, or pipeline.
  • Manager: A budget policy manager can edit the policy’s definitions and permissions. Any user in your workspace can be given the manager permissions.

To assign permissions on a budget policy:

  1. On the policy’s page, click the Permissions tab.
  2. Click Grant access.
  3. Select the user, group, or service principal you want to assign the policy to.
  4. Under Role, select the role(s) you want to give the user.
  5. To continue adding identities to the policy, click Add another.
  6. Click Save.

If a user is assigned a single policy, then that policy is applied to their resources by default. If a user is assigned multiple policies, they must select the appropriate policy whenever they create a new serverless notebook, job, or pipeline. If you don’t select a policy, the setting defaults to whichever policy comes first alphabetically.

Update a budget policy

To update an existing budget policy’s name or tags:

  1. Click your username in the top bar of the Azure Databricks workspace and select Settings.
  2. Click Compute.
  3. Next to Budget policies, click Manage.
  4. Select the budget policy you want to update, then click Edit.
  5. Make the updates then click Save.

Policy changes are only applied to usage initiated after the policy update. They are not applied to currently running serverless usage.

Analyze budget policy tags in the billing records

Once a policy is applied to a notebook, job, or Delta Live Tables pipeline, any tags contained in the policy propagate to your system.billing.usage system table in the custom_tags column.

Note

Budget policy tags also propagate to the billing records emitted to Azure cost analysis.

If a notebook is run as part of a job, only the job’s budget policy is applied to the usage record.

Where to select the budget policy

Users assigned to multiple budget policies must select the appropriate policy whenever they create a new notebook, job, or pipeline.

Known limitations

Budget policies have the following limitations:

  • Existing notebooks, jobs, and Delta Live Tables pipelines are not automatically assigned policies after their owners are granted access to a policy. Policies are required on new assets but existing assets must be updated to add a policy.
  • When creating a scheduled notebook job from the notebook page, the notebook’s budget policy defaults back to the first available policy by alphabetical order.
  • Policy IDs stored with an asset remain even if the policy is deleted. These policies do not apply any tags.
  • Updates to budget policy tags are reflected on any serverless usage initiated after the change to the policy. For example, if a job is running while a budget policy is updated, the update does not take effect for the existing job run. The next job run uses the updated tags.
  • Git repo integration does not have repo-configurable budget policies, the budget policy defaults to the user’s last chosen policy.
  • Budget policies do not apply tags to classic compute resources.
  • Tags inherited from budget policies do not appear on the Jobs list UI.
  • Updates to tags won’t be reflected in new pipeline updates if the pipeline is in Development mode. The changes take 24 hours to propagate.
  • Pipelines triggered by jobs do not inherit the job’s budget policy. Users must set the pipeline’s budget policy.