|
2 | 2 | Terraform module used for Databricks Workspace configuration and Resources creation
|
3 | 3 |
|
4 | 4 | ## Usage
|
5 |
| - |
| 5 | +This module provides an ability for Databricks Workspace configuration and Resources creation. |
| 6 | + |
| 7 | +```hcl |
| 8 | +data "azurerm_databricks_workspace" "example" { |
| 9 | + name = "example-workspace" |
| 10 | + resource_group_name = "example-rg" |
| 11 | +} |
| 12 | +
|
| 13 | +data "azurerm_key_vault" "example" { |
| 14 | + name = "examplekeyvault" |
| 15 | + resource_group_name = "example-rg" |
| 16 | +} |
| 17 | +
|
| 18 | +data "azurerm_storage_account" "example" { |
| 19 | + name = "example-storage" |
| 20 | + resource_group_name = "example-rg" |
| 21 | +} |
| 22 | +
|
| 23 | +module "databricks_runtime_core" { |
| 24 | + source = "data-platform-hq/databricks-runtime/databricks" |
| 25 | + version = "1.4.0" |
| 26 | +
|
| 27 | + sku = "standard" |
| 28 | + workspace_id = azurerm_databricks_workspace.example.workspace_id |
| 29 | + users = ["user1", "user2"] |
| 30 | +
|
| 31 | + # Parameters of Service principal used for ADLS mount |
| 32 | + key_vault_id = data.azurerm_key_vault.example.id |
| 33 | + sp_client_id_secret_name = "sp-client-id" |
| 34 | + sp_key_secret_name = "sp-key" |
| 35 | + tenant_id_secret_name = "infra-arm-tenant-id" |
| 36 | +
|
| 37 | + # Default cluster parameters |
| 38 | + custom_default_cluster_name = "databricks_example_custer" |
| 39 | + cluster_nodes_availability = "SPOT_AZURE" |
| 40 | +
|
| 41 | +
|
| 42 | + cluster_log_conf_destination = "dbfs:/cluster-logs" |
| 43 | + custom_cluster_policies = [{ |
| 44 | + name = "custom_policy_1", |
| 45 | + assigned = true, |
| 46 | + can_use = null, |
| 47 | + definition = { |
| 48 | + "autoscale.max_workers": { |
| 49 | + "type": "range", |
| 50 | + "maxValue": 3, |
| 51 | + "defaultValue": 2 |
| 52 | + }, |
| 53 | + } |
| 54 | + }] |
| 55 | +
|
| 56 | + # Additional Secret Scope |
| 57 | + secret_scope = [{ |
| 58 | + scope_name = null |
| 59 | + acl = null |
| 60 | + secrets = null |
| 61 | + }] |
| 62 | +
|
| 63 | + mountpoints = { |
| 64 | + storage_account_name = data.azurerm_storage_account.example.name |
| 65 | + container_name = "example_container" |
| 66 | + } |
| 67 | +
|
| 68 | + providers = { |
| 69 | + databricks = databricks.main |
| 70 | + } |
| 71 | +} |
| 72 | +``` |
6 | 73 | <!-- BEGIN_TF_DOCS -->
|
7 | 74 | ## Requirements
|
8 | 75 |
|
|
0 commit comments