Skip to content

Commit 9b9c1fa

Browse files
authored
Add more attributes to databricks_cluster (#1459)
1 parent 88b85d2 commit 9b9c1fa

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

clusters/clusters_api.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,16 @@ type EventsResponse struct {
345345
TotalCount int64 `json:"total_count"`
346346
}
347347

348+
type WorkloadTypeClients struct {
349+
Notebooks bool `json:"notebooks" tf:"optional,default:true"`
350+
Jobs bool `json:"jobs" tf:"optional,default:true"`
351+
}
352+
353+
// WorkloadType defines which workloads may run on the cluster
354+
type WorkloadType struct {
355+
Clients *WorkloadTypeClients `json:"clients"`
356+
}
357+
348358
// Cluster contains the information when trying to submit api calls or editing a cluster
349359
type Cluster struct {
350360
ClusterID string `json:"cluster_id,omitempty"`
@@ -375,9 +385,10 @@ type Cluster struct {
375385
ClusterLogConf *StorageInfo `json:"cluster_log_conf,omitempty"`
376386
DockerImage *DockerImage `json:"docker_image,omitempty"`
377387

378-
DataSecurityMode string `json:"data_security_mode,omitempty"`
379-
SingleUserName string `json:"single_user_name,omitempty"`
380-
IdempotencyToken string `json:"idempotency_token,omitempty" tf:"force_new"`
388+
DataSecurityMode string `json:"data_security_mode,omitempty"`
389+
SingleUserName string `json:"single_user_name,omitempty"`
390+
IdempotencyToken string `json:"idempotency_token,omitempty" tf:"force_new"`
391+
WorkloadType *WorkloadType `json:"workload_type,omitempty"`
381392
}
382393

383394
func (cluster Cluster) Validate() error {

0 commit comments

Comments
 (0)