Skip to content

Latest commit

 

History

History

adb-vnet-injection

VNet-injected Azure Databricks workspace and workspace objects

This example deploys a vnet-injected Azure Databricks workspace with a single cluster. You can use it to learn how to start using this repo's examples and deploy resources into your Azure Environment.

Step 1: Configure authentication to providers

Navigate to providers.tf and configure authentication to azurerm and Databricks providers. Read following docs for extensive information on how to configure authentication to providers:

azurerm provider authentication methods

databricks provider authentication methods and MSFT doc

In this demo we can use the simplest AZ CLI method to authenticate to both azurerm and databricks providers via az login. For production deployment, we recommend using service principal authentication method.

Step 2: Configure input values to your terraform template

Navigate to variables.tf and configure input values to your terraform template. Read following docs for extensive information on how to configure input values to your terraform template:

hashicorp tutorial on input variables

Step 3: Deploy to your Azure environment

The identity that you use in az login to deploy this template should have contributor role in your azure subscription, or the minimum required permissions to deploy resources in this template.

Do following steps:

Run terraform init to initialize terraform and download required providers.

Run terraform plan to see what resources will be deployed.

Run terraform apply to deploy resources to your Azure environment. Since we used az login method to authenticate to providers, you will be prompted to login to Azure via browser. Enter yes when prompted to deploy resources.

Step 4: Verify deployment

Navigate to Azure Portal and verify that all resources were deployed successfully. You should now have a vnet-injected workspace with one cluster deployed.

Requirements

Name Version
azurerm >=3.0.0
databricks >=1.13.0

Providers

Name Version
azurerm 3.49.0
databricks 1.13.0
random 3.4.3

Modules

Name Source Version
auto_scaling_cluster_example ./modules/autoscaling_cluster n/a

Resources

Name Type
azurerm_databricks_workspace.example resource
azurerm_network_security_group.this resource
azurerm_resource_group.this resource
azurerm_subnet.private resource
azurerm_subnet.public resource
azurerm_subnet_network_security_group_association.private resource
azurerm_subnet_network_security_group_association.public resource
azurerm_virtual_network.this resource
random_string.naming resource
databricks_spark_version.latest_lts data source

Inputs

Name Description Type Default Required
cidr n/a string "10.179.0.0/20" no
dbfs_prefix n/a string "dbfs" no
global_auto_termination_minute n/a number 30 no
no_public_ip n/a bool true no
node_type n/a string "Standard_DS3_v2" no
rglocation n/a string "southeastasia" no
workspace_prefix n/a string "adb" no

Outputs

Name Description
databricks_azure_workspace_resource_id n/a
module_cluster_id n/a
workspace_url n/a