You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If KMS encryption enabled (and existing MongoDB instance is not being passed), parse details from the existing key if being passed, otherwise get it from the key that the DA creates
description="Set to true to enable KMS Encryption using customer managed keys. When set to true, a value must be passed for either 'existing_kms_instance_crn', 'existing_kms_key_crn' or 'existing_backup_kms_key_crn'."
172
172
default=false
173
-
}
174
-
175
-
variable"use_ibm_owned_encryption_key" {
176
-
type=bool
177
-
description="IBM Cloud Databases will secure your deployment's data at rest automatically with an encryption key that IBM hold. Alternatively, you may select your own Key Management System instance and encryption key (Key Protect or Hyper Protect Crypto Services) by setting this to false. If setting to false, a value must be passed for `existing_kms_instance_crn` to create a new key, or `existing_kms_key_crn` and/or `existing_backup_kms_key_crn` to use an existing key."
178
-
default=true
179
173
180
174
validation {
181
175
condition=(
182
176
!var.kms_encryption_enabled||
183
177
var.existing_mongodb_instance_crn!=null||
184
-
!(var.use_ibm_owned_encryption_key&&(
178
+
(
185
179
var.existing_kms_instance_crn!=null||
186
180
var.existing_kms_key_crn!=null||
187
181
var.existing_backup_kms_key_crn!=null
188
-
))
189
-
)
190
-
error_message="When 'kms_encryption_enabled' is true and setting values for 'existing_kms_instance_crn', 'existing_kms_key_crn' or 'existing_backup_kms_key_crn', the 'use_ibm_owned_encryption_key' input must be set to false."
191
-
}
192
-
193
-
# this validation ensures key info is provided when IBM-owned key is disabled and no MongoDB instance is given
194
-
validation {
195
-
condition=(!var.kms_encryption_enabled||
196
-
var.existing_mongodb_instance_crn!=null||
197
-
var.use_ibm_owned_encryption_key||
198
-
var.existing_kms_instance_crn!=null||
199
-
var.existing_kms_key_crn!=null
182
+
)
200
183
)
201
-
error_message="When 'kms_encryption_enabled' is true and 'use_ibm_owned_encryption_key' is false, you must provide either 'existing_kms_instance_crn' (to create a new key) or 'existing_kms_key_crn' (to use an existing key)."
184
+
error_message="When 'kms_encryption_enabled' is true and setting values for 'existing_kms_instance_crn', 'existing_kms_key_crn' or 'existing_backup_kms_key_crn'."
error_message="When using ibm owned encryption keys by setting input 'use_ibm_owned_encryption_key' to true, 'existing_kms_instance_crn', 'existing_kms_key_crn' and 'existing_backup_kms_key_crn' should not be set."
191
+
error_message="When using ibm owned encryption keys by setting input 'kms_encryption_enabled' to false, 'existing_kms_instance_crn', 'existing_kms_key_crn' and 'existing_backup_kms_key_crn' should not be set."
0 commit comments