Skip to content

Commit e1ff063

Browse files
Leonid_Frolov1Leonid_Frolov1
authored andcommitted
fix: changed default value, var name, formatting
1 parent a92025d commit e1ff063

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

cluster.tf

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
resource "databricks_cluster" "cluster" {
22
for_each = { for cluster in var.clusters : cluster.cluster_name => cluster }
33

4-
cluster_name = each.value.cluster_name
5-
spark_version = each.value.spark_version
6-
spark_conf = each.value.enabled_adls_passthrought ? merge(each.value.spark_conf,
7-
{
8-
"spark.databricks.cluster.profile" : "serverless",
9-
"spark.databricks.repl.allowedLanguages" : "python,sql",
10-
"spark.databricks.passthrough.enabled" : "true",
11-
"spark.databricks.pyspark.enableProcessIsolation" : "true"
12-
}) : each.value.spark_conf
4+
cluster_name = each.value.cluster_name
5+
spark_version = each.value.spark_version
6+
spark_conf = each.value.cluster_conf_passthrought ? merge({
7+
"spark.databricks.cluster.profile" : "serverless",
8+
"spark.databricks.repl.allowedLanguages" : "python,sql",
9+
"spark.databricks.passthrough.enabled" : "true",
10+
"spark.databricks.pyspark.enableProcessIsolation" : "true"
11+
}, each.value.spark_conf) : each.value.spark_conf
1312
spark_env_vars = each.value.spark_env_vars
14-
data_security_mode = each.value.data_security_mode
13+
data_security_mode = each.value.cluster_conf_passthrought ? null : each.value.data_security_mode
1514
node_type_id = each.value.node_type_id
1615
autotermination_minutes = each.value.autotermination_minutes
1716

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ output "metastore_id" {
1616
output "token" {
1717
value = databricks_token.pat.token_value
1818
description = "Databricks Personal Authorization Token"
19-
sensitive = true
19+
sensitive = true
2020
}
2121

2222
output "clusters" {

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ variable "clusters" {
228228
cluster_name = string
229229
spark_version = optional(string, "11.3.x-scala2.12")
230230
spark_conf = optional(map(any), {})
231-
enabled_adls_passthrought = optional(bool, false)
231+
cluster_conf_passthrought = optional(bool, false)
232232
spark_env_vars = optional(map(any), {})
233233
data_security_mode = optional(string, "USER_ISOLATION")
234234
node_type_id = optional(string, "Standard_D3_v2")

0 commit comments

Comments
 (0)