Skip to content

Commit fdd93df

Browse files
authored
Add support for init scripts from Unity Catalog Volumes in databricks_cluster (#2666)
1 parent 9d41e18 commit fdd93df

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

clusters/clusters_api.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,13 @@ type StorageInfo struct {
220220

221221
// InitScriptStorageInfo captures the allowed sources of init scripts.
222222
type InitScriptStorageInfo struct {
223-
Dbfs *DbfsStorageInfo `json:"dbfs,omitempty" tf:"group:storage"`
224-
Gcs *GcsStorageInfo `json:"gcs,omitempty" tf:"group:storage"`
225-
S3 *S3StorageInfo `json:"s3,omitempty" tf:"group:storage"`
226-
Abfss *AbfssStorageInfo `json:"abfss,omitempty" tf:"group:storage"`
227-
File *LocalFileInfo `json:"file,omitempty"`
228-
Workspace *WorkspaceFileInfo `json:"workspace,omitempty"`
223+
Dbfs *DbfsStorageInfo `json:"dbfs,omitempty" tf:"group:storage"`
224+
Gcs *GcsStorageInfo `json:"gcs,omitempty" tf:"group:storage"`
225+
S3 *S3StorageInfo `json:"s3,omitempty" tf:"group:storage"`
226+
Abfss *AbfssStorageInfo `json:"abfss,omitempty" tf:"group:storage"`
227+
File *LocalFileInfo `json:"file,omitempty"`
228+
Workspace *WorkspaceFileInfo `json:"workspace,omitempty"`
229+
Volumes *compute.VolumesStorageInfo `json:"volumes,omitempty"`
229230
}
230231

231232
// SparkNodeAwsAttributes is the struct that determines if the node is a spot instance or not

docs/resources/cluster.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,16 @@ init_scripts {
270270
}
271271
```
272272

273+
Example of using a file from Unity Catalog Volume as init script:
274+
275+
```hcl
276+
init_scripts {
277+
volumes {
278+
destination = "/Volumes/Catalog/default/init-scripts/init-script.sh"
279+
}
280+
}
281+
```
282+
273283
Example of taking init script from DBFS (deprecated):
274284

275285
```hcl

0 commit comments

Comments
 (0)