Is it possible to create external volume using databricks asset bundle?

hpant
New Contributor III

Is it possible to create external volume using databricks asset bundle? I have this code from databricks.yml file which is working perfectly fine for manged volume:

    resources:
      volumes:
        bronze_checkpoints_volume:
          catalog_name: ${var.catalog}
          name: checkpoints
          schema_name: bronze
 
Is there a way to do it for external volume as well?

ashraf1395
Honored Contributor

Hey @hpant Yes, we can create external databricks volumes as well using databricks asset bundles 

bundle:
  name: external_volume
resources:
  volumes:
    external_volume_creation:
      catalog_name: retail_data
      name: test_volume
      schema_name: bronze
      storage_location: s3://external_location_path
      volume_type: EXTERNAL

 Regards

nayan_wylde
Esteemed Contributor II

bundle:
name: my_azure_volume_bundle

resources:
volumes:
my_external_volume:
catalog_name: main
schema_name: my_schema
name: my_external_volume
volume_type: EXTERNAL
storage_location: abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/<path>
comment: "An external volume in Azure storage"
grants:
- principal: users
privileges:
- READ_VOLUME
- principal: my_team
privileges:
- WRITE_VOLUME
- READ_VOLUME

targets:
dev:
default: true
workspace:
host: https://<your-databricks-workspace-url>
mode: development
prod:
workspace:
host: https://<your-production-workspace-url>