cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

issue related to Cluster Policy

Databricks_S
New Contributor II

Hello Databricks Community,

I am currently working on creating a Terraform script to provision clusters in Databricks. However, I've noticed that by default, the clusters created using Terraform have the policy set to "Unrestricted."

I would like to configure my Terraform script so that the default cluster policy is either "Personal Compute" or "Shared" instead of "Unrestricted." Could you please advise on the best approach to achieve this?

Thank you for your assistance.


#unitycatalog

3 REPLIES 3

Walter_C
Honored Contributor
Honored Contributor

Hello, many thanks for your question, on the cluster creation template there is an optional setting called policy_id, this id can be retrieved from the UI, if you go under Compute > Policies > Select the policy you want to set.

By default if the user you are using to create the cluster has Unrestricted cluster creation entitlement then all clusters will be created with it.

Source: https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/cluster#policy_i...

thank you so much for your help, I have a question regarding the use of policy IDs in the configuration of Databricks clusters. I'm curious to know whether policy IDs are static or subject to change. Specifically, I'm interested in understanding if policy IDs remain constant once assigned or if they can change over time. Could you please clarify this for me?

Walter_C
Honored Contributor
Honored Contributor

The policy id will persist, it is tied to the configuration you have set, even if changing the configuration of a custom policy it will persist with same policy id

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!