Disable cluster-scoped init scripts on DBFS

Set a cluster policy to prevent users from creating clusters that load cluster-scoped init scripts from DBFS.

Written by Adam Pavlacka

Last published at: May 2nd, 2023

On May 2, 2023 Databricks announced that cluster-scoped init scripts stored on DBFS are deprecated. Cluster-scoped init scripts should be stored as workplace files.

You can prevent users from launching clusters using cluster-scoped init scripts stored on DBFS by setting a cluster policy.

Instructions

Warning

You must be a Databricks admin to apply cluster policies.

 

1. Follow the documentation to Create a cluster policy (AWS | Azure | GCP).

2. Add the following to the cluster policy:

"init_scripts.*.dbfs.destination": {
   "type": "forbidden"
}

3. Apply the policy to all users.

After the policy has been applied, users will no longer be able to create clusters that use init scripts loaded from DBFS.

Was this article helpful?