File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ resource "databricks_secret" "this" {
4646
4747# Azure Key Vault-backed Scope
4848resource "azurerm_key_vault_access_policy" "databricks" {
49- for_each = {
49+ for_each = var . create_databricks_access_policy_to_key_vault ? {
5050 for param in var . key_vault_secret_scope : (param. name ) => param
5151 if length (param. name ) != 0
52- }
52+ } : {}
5353
5454 key_vault_id = each. value . key_vault_id
5555 object_id = " 9b38785a-6e08-4087-a0c4-20634343f21f" # Global 'AzureDatabricks' SP object id
Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ variable "key_vault_id" {
118118}
119119
120120# Azure Key Vault-backed Secret Scope
121+ variable "create_databricks_access_policy_to_key_vault" {
122+ type = bool
123+ description = " Boolean flag to enable creation of Key Vault Access Policy for Databricks Global Service Principal."
124+ default = true
125+ }
126+
121127variable "key_vault_secret_scope" {
122128 type = list (object ({
123129 name = optional (string )
You can’t perform that action at this time.
0 commit comments