https://pulumi.com logo
#aws
Title
# aws
s

sparse-optician-70334

09/22/2023, 8:51 AM
When defining a databricks.Cluster in Pulumi how can I prevent it from starting the cluster? Pulumi AI suggest
num_workers=0
but at least for single node personal clusters this does not work and Pulumi is starting the cluster. As a result executing pulumi takes a very long time. How can I simply only define the cluster - but not start it?
m

mysterious-raincoat-41852

09/22/2023, 6:47 PM
I think num_workers=0 is part of default configuration for single node https://docs.databricks.com/en/clusters/single-node.html. Also its Databricks API call so I think its not Pulumi starting the cluster but Databricks so I would check their docs. https://docs.databricks.com/api/workspace/clusters/create Try to specify autoscale, min=max_workers=0?
s

sparse-optician-70334

09/26/2023, 7:38 AM
no it is always spun up
m

mysterious-raincoat-41852

09/26/2023, 1:03 PM
I don’t see any API to “start” cluster (only restart though) so I think its behavior by design. Asked internally but not sure can get answer quickly
This is the suggestion (but it would not solve the waiting issue I think?) What will work is to give two consequent API calls: One for creating a new cluster and then one for terminating it right afterwards. POST /api/2.0/clusters/create POST /api/2.0/clusters/delete This will stop the cluster creation
s

sparse-optician-70334

09/27/2023, 10:35 AM
thanks