Tag a Managed Resource Group for Azure Databricks Tag a Managed Resource Group for Azure Databricks azure azure

Tag a Managed Resource Group for Azure Databricks


Unfortunately, you are not allowed to add custom tags for the Managed Resource Group created in Azure Databricks using Azure portal/PowerShell/CLI.

Reason: By default, you cannot perform any write operation on the managed resource group.

If you try to modify anything in the managed resource group, you will see this error message:

{"details":[{"code":"ScopeLocked","message":"The scope '/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/databricks-rg-chepra-d7ensl75cgiki' cannot perform write operation because following scope(s) are locked: '/subscriptions/xxxxxxxxxxxxxxxxxxxx/resourceGroups/databricks-rg-chepra-d7ensl75cgiki'. Please remove the lock and try again."}]}

Possible way: You can specify tags as key-value pairs when while creating/modifying clusters, and Azure Databricks will apply these tags to cloud resources.

Cluster tags allow you to easily monitor the cost of cloud resources used by various groups in your organization. You can specify tags as key-value pairs when you create a cluster, and Databricks applies these tags to cloud resources like VMs and disk volumes.

For convenience, Databricks applies four default tags to each cluster: Vendor, Creator, ClusterName, and ClusterId. You can add custom tags when you create a cluster. To configure cluster tags:

  1. On the cluster configuration page, click the Advanced Options toggle.
  2. At the bottom of the page, click the Tags tab.

enter image description here

  1. Add a key-value pair for each custom tag. You can add up to 45 custom tags.

Now you can see the previously added tag in the portal:

enter image description here

Reference: Azure Databricks - Cluster Tags.

Hope this helps.


Any tags that you use when creating the Databricks workspace will be used for the managed resource group as well so just make sure you add the needed tags to the workspace when creating it. I know this works when creating the workspace from the Azure Portal but I can't see any reason this wouldn't work when using ARM templates (or Terraform for that matter).

Also, I'm also pretty sure that future changes will be propagated to said resource group.


Based on the post I found:,

Since Feb 10 2020, the Databricks resource will propagate any tags applied to the Databricks resource to the managed resources it created.

I think the solution is more simpler now by tagging Databricks resource directly.Hope this answer (by others) works for everyone seeing this post.