| subcategory | Workspace |
|---|
This resource allows you to manage directories in Databricks Workpace.
-> This resource can only be used with a workspace-level provider!
You can declare a Terraform-managed directory by specifying the path attribute of the corresponding directory.
resource "databricks_directory" "my_custom_directory" {
path = "/my_custom_directory"
}The following arguments are supported:
path- (Required) The absolute path of the directory, beginning with "/", e.g. "/Demo".delete_recursive- Whether or not to trigger a recursive delete of this directory and its resources when deleting this on Terraform. Defaults tofalseprovider_config- (Optional) Configure the provider for management through account provider. This block consists of the following fields:workspace_id- (Required) Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
In addition to all arguments above, the following attributes are exported:
id- Path of directory on workspaceobject_id- Unique identifier for a DIRECTORYworkspace_path- path on Workspace File System (WSFS) in form of/Workspace+path
- databricks_permissions can control which groups or individual users can access folders.
The resource directory can be imported using directory path:
import {
to = databricks_directory.this
id = "/path/to/directory"
}Alternatively, when using terraform version 1.4 or earlier, import using the terraform import command:
terraform import databricks_directory.this /path/to/directoryThe following resources are often used in the same context:
- End to end workspace management guide.
- databricks_notebook to manage Databricks Notebooks.
- databricks_notebook data to export a notebook from Databricks Workspace.
- databricks_notebook_paths data to list notebooks in Databricks Workspace.
- databricks_repo to manage Databricks Repos.
- databricks_spark_version data to get Databricks Runtime (DBR) version that could be used for
spark_versionparameter in databricks_cluster and other resources. - databricks_workspace_conf to manage workspace configuration for expert usage.