|
1 | 1 | resource "databricks_cluster" "cluster" {
|
2 | 2 | for_each = { for cluster in var.clusters : cluster.cluster_name => cluster }
|
3 | 3 |
|
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 |
13 | 12 | 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 |
15 | 14 | node_type_id = each.value.node_type_id
|
16 | 15 | autotermination_minutes = each.value.autotermination_minutes
|
17 | 16 |
|
|
0 commit comments