+++ title = "azure_adls_gen2_mount" date = 2020-04-20T23:34:03-04:00 weight = 15 chapter = false pre = "" +++
This resource given a cluster id will help you create, get and delete a azure data lake gen 2 (ADLS gen 2) mount using a service principal/enterprise ad application which will provide you a client id and client secret to authenticate.
{{% notice warning %}} It is important to understand that this will start up the cluster if the cluster is terminated.
The read and refresh terraform command will require a cluster and make take some time to validate mount.
If the cluster associated with the mount is deleted, then the mount will be re-created by terraform on next plan. It is important to note that provided the mount path and the storage account information remains the same, the mount will not actually get re-created inside the workspace. {{% /notice %}}
{{% notice note %}}
You can locate the mount in dbfs at dbfs:/mnt/<mount_name>
{{% /notice %}}
resource "databricks_azure_adls_gen2_mount" "my_custom_mount2" {
cluster_id = "####-######-pear###"
container_name = "my_storage_container"
storage_account_name = "mystorageaccountname"
mount_name = "my_cool_adls_gen2_mount"
tenant_id = "????????-????-????-????-????????????"
client_id = "????????-????-????-????-????????????"
client_secret_scope = "my_adls_client_secret_scope"
client_secret_key= "my_adls_client_secret_key"
}
The following arguments are supported:
(Required) This is the cluster id in which the mount will be initalized from. If the cluster is in a terminated state it will be started.
(Required) The container in which the data is. This is what you are trying to mount.
(Required) The name of the storage account in which the data is. This is what you are trying to mount.
(Optional) This is optional if you want to add an additional directory that you wish to mount. This must start with a "/"
(Required) The name of the folder that you want to mount to in dbfs. You can access the data from
/mnt/<mount_name>
(Required) This is your azure directory tenant id. This is required for creating the mount.
(Required) This is the client_id for the enterprise application for the service principal.
(Required) This is the secret scope in which your service principal/enterprise app client secret will be stored.
(Required) This is the secret key in which your service principal/enterprise app client secret will be stored.
In addition to all arguments above, the following attributes are exported:
Identifier for a adls gen 2 mount.
{{% notice note %}} Importing this resource is not currently supported. {{% /notice %}}