| subcategory | Unity Catalog |
|---|
Volumes are a new Unity Catalog (UC) capability for accessing, storing, governing, and organizing files. Volumes unlock new processing capabilities for data governed by the Unity Catalog, including support for most machine learning and data science workloads. You can use volumes to store and access files in any format; data can be structured, semi-structured, or unstructured.
Volumes are organized under a 3-level namespace: <catalog>.<schema>.<volume>.
This resource manages Volumes in Unity Catalog.
resource "databricks_catalog" "sandbox" {
metastore_id = databricks_metastore.this.id
name = "sandbox"
comment = "this catalog is managed by terraform"
properties = {
purpose = "testing"
}
}
resource "databricks_schema" "things" {
catalog_name = databricks_catalog.sandbox.name
name = "things"
comment = "this schema is managed by terraform"
properties = {
kind = "various"
}
}
resource "databricks_storage_credential" "external" {
name = "creds"
aws_iam_role {
role_arn = aws_iam_role.external_data_access.arn
}
}
resource "databricks_external_location" "some" {
name = "external-location"
url = "s3://${aws_s3_bucket.external.id}/some"
credential_name = databricks_storage_credential.external.name
}
resource "databricks_volume" "this" {
name = "quickstart_volume"
catalog_name = databricks_catalog.sandbox.name
schema_name = databricks_schema.things.name
volume_type = "EXTERNAL"
storage_location = databricks_external_location.some.url
comment = "this volume is managed by terraform"
}The following arguments are supported:
name- Name of the Volumecatalog_name- Name of parent Catalogschema_name- Name of parent Schema relative to parent Catalogvolume_type- Volume type.EXTERNALorMANAGED.owner- (Optional) Name of the volume owner.storage_location- (Optional) Path inside an External Location. Only used forEXTERNALVolumes.comment- (Optional) Free-form text.
This resource can be imported by full_name which is the 3-level Volume identifier: <catalog>.<schema>.<volume>
$ terraform import databricks_volume.this <catalog_name>.<schema_name>.<name>