Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 2.85 KB

File metadata and controls

71 lines (48 loc) · 2.85 KB
subcategory Workspace

databricks_directory Resource

API Documentation

This resource allows you to manage directories in Databricks Workpace.

-> This resource can only be used with a workspace-level provider!

Example Usage

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"
}

Argument Reference

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 to false
  • provider_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.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • id - Path of directory on workspace
  • object_id - Unique identifier for a DIRECTORY
  • workspace_path - path on Workspace File System (WSFS) in form of /Workspace + path

Access Control

Import

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/directory

Related Resources

The following resources are often used in the same context: