cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Can I add custom cluster tag from init script ?

Tahseen0354
Contributor III

Hi, is it possible to add custom tags from init script during cluster initialization ? We would like to automatically add custom tags whenever someone creates a new cluster in databricks.

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Cluster policy permissions limit which policies a user can select in the Policy drop-down when the user creates a cluster:

  • A user who has cluster create permission can select the Unrestricted policy and create fully-configurable clusters.
  • A user who has both cluster create permission and access to cluster policies can select the Unrestricted policy and policies they have access to.
  • A user that has access to only cluster policies, can select the policies they have access to.

https://docs.databricks.com/administration-guide/clusters/policies.html#manage-cluster-policy-permis...

View solution in original post

3 REPLIES 3

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Hi @Md Tahseen Anamโ€‹ I don't think there is a possibility to use an init script for cust tags. But the easiest way is to use cluster policies. You can mention a list of custom tags in the policy so that you can simply add the policy to the cluster while creating. Other than the tags, you can set the DBR version, spark configs, etc using the cluster policy.

https://docs.databricks.com/administration-guide/clusters/policies.html#unlimited-policy

Thanks for your reply. I think cluster policy can be a way to do that if I can force user to select that policy by auto-selecting the policy for them whenever they try to create a new cluster and disabling users from selecting any other policy. Can I do that ?

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Cluster policy permissions limit which policies a user can select in the Policy drop-down when the user creates a cluster:

  • A user who has cluster create permission can select the Unrestricted policy and create fully-configurable clusters.
  • A user who has both cluster create permission and access to cluster policies can select the Unrestricted policy and policies they have access to.
  • A user that has access to only cluster policies, can select the policies they have access to.

https://docs.databricks.com/administration-guide/clusters/policies.html#manage-cluster-policy-permis...

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!