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" {
46
46
47
47
# Azure Key Vault-backed Scope
48
48
resource "azurerm_key_vault_access_policy" "databricks" {
49
- for_each = {
49
+ for_each = var . create_databricks_access_policy_to_key_vault ? {
50
50
for param in var . key_vault_secret_scope : (param. name ) => param
51
51
if length (param. name ) != 0
52
- }
52
+ } : {}
53
53
54
54
key_vault_id = each. value . key_vault_id
55
55
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" {
118
118
}
119
119
120
120
# 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
+
121
127
variable "key_vault_secret_scope" {
122
128
type = list (object ({
123
129
name = optional (string )
You can’t perform that action at this time.
0 commit comments