Skip to content

Commit c1154e8

Browse files
authored
docs: updated example
1 parent 5054782 commit c1154e8

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@ This module provides an ability for Databricks Workspace configuration and Resou
1010
5. Users for Standard SKU Worspaces
1111

1212
```hcl
13+
# Prerequisite resources
1314
data "azurerm_databricks_workspace" "example" {
1415
name = "example-workspace"
1516
resource_group_name = "example-rg"
1617
}
1718
19+
# Databricks Provider configuration
20+
provider "databricks" {
21+
alias = "main"
22+
host = data.azurerm_databricks_workspace.example.workspace_url
23+
azure_workspace_resource_id = data.azurerm_databricks_workspace.example.id
24+
}
25+
1826
# Key Vault which contains Service Principal credentials (App ID and Secret) for mounting ADLS Gen 2
1927
data "azurerm_key_vault" "example" {
2028
name = "example-key-vault"
@@ -26,12 +34,7 @@ data "azurerm_storage_account" "example" {
2634
resource_group_name = "example-rg"
2735
}
2836
29-
provider "databricks" {
30-
alias = "main"
31-
host = data.azurerm_databricks_workspace.example.workspace_url
32-
azure_workspace_resource_id = data.azurerm_databricks_workspace.example.id
33-
}
34-
37+
# Databricks Runtime module usage example
3538
module "databricks_runtime_core" {
3639
source = "data-platform-hq/databricks-runtime/databricks"
3740
@@ -42,15 +45,15 @@ module "databricks_runtime_core" {
4245
users = ["user1", "user2"]
4346
4447
# Parameters of Service principal used for ADLS mount
45-
# Imports App ID and Secret of Service Principal
48+
# Imports App ID and Secret of Service Principal from target Key Vault
4649
key_vault_id = data.azurerm_key_vault.example.id
4750
sp_client_id_secret_name = "sp-client-id"
4851
sp_key_secret_name = "sp-key"
4952
tenant_id_secret_name = "infra-arm-tenant-id"
5053
5154
# Default cluster parameters
5255
custom_default_cluster_name = "databricks_example_custer"
53-
cluster_nodes_availability = "SPOT_AZURE" # requires Regional Spot quotas increase
56+
cluster_nodes_availability = "SPOT_AZURE" # it required to increase Regional Spot quotas
5457
cluster_log_conf_destination = "dbfs:/cluster-logs"
5558
custom_cluster_policies = [{
5659
name = "custom_policy_1",
@@ -68,7 +71,7 @@ module "databricks_runtime_core" {
6871
# Additional Secret Scope
6972
secret_scope = [{
7073
scope_name = "extra-scope"
71-
acl = null # Only group names are allowed. If left empty then only Worspace admins could access these keys
74+
acl = null # Only group names are allowed. If left empty then only Workspace admins could access these keys
7275
secrets = [
7376
{ key = "secret-name", string_value = "secret-value"}
7477
]

0 commit comments

Comments
 (0)