Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
  • Loading branch information
tanya-borisova committed Aug 8, 2023
1 parent f40b465 commit a7f58d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion infrastructure/transform/adf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource "azurerm_data_factory_linked_service_azure_databricks" "msi_linked" {

msi_work_space_resource_id = azurerm_databricks_workspace.databricks.id

existing_cluster_id = databricks_cluster.fixed_single_node.cluster_id
existing_cluster_id = databricks_cluster.cluster.cluster_id
}

resource "azurerm_data_factory_linked_service_key_vault" "msi_linked" {
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/transform/databricks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ data "databricks_node_type" "node_type" {
depends_on = [time_sleep.wait_for_databricks_network]
}

resource "databricks_cluster" "fixed_single_node" {
resource "databricks_cluster" "cluster" {
cluster_name = "Fixed Job Cluster"
spark_version = data.databricks_spark_version.latest.id
node_type_id = data.databricks_node_type.node_type.id
Expand Down Expand Up @@ -105,7 +105,7 @@ resource "databricks_cluster" "fixed_single_node" {
}),
# Additional secrets from the config
tomap({ for secret in var.transform.databricks_secrets :
"spark.secret.${secret.key}" => "{{secrets/${databricks_secret_scope.secrets.name}/${secret.key}}}"
"spark.secret.${secret.name}" => "{{secrets/${databricks_secret_scope.secrets.name}/${secret.name}}}"
}),
# Any values set in the config
tomap({ for config_value in var.transform.spark_config :
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/transform/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "databricks_secret" "flowehr_databricks_sql_database" {
# Additional Databricks secrets passed in from the config
resource "databricks_secret" "databricks_config_secret" {
for_each = { for secret in var.transform.databricks_secrets :
secret.key => secret.value
secret.name => secret.value
}

key = each.key
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/transform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ variable "transform" {
spark_config = optional(list(object({
key = string,
value = string
})), []),
})), [])
databricks_secrets = optional(list(object({
key = string,
name = string,
value = string,
})), [])
databricks_libraries = optional(object({
Expand Down

0 comments on commit a7f58d1

Please sign in to comment.