Skip to content

Commit 86a95ea

Browse files
jor2Jordan-Williams2
andauthored
fix: bug with validation (#559)
* fix: bug with validation --------- Co-authored-by: Jordan-Williams2 <Jordan.Williams2@ibm.com>
1 parent 5cb2c88 commit 86a95ea

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

modules/fscloud/variables.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,6 @@ variable "backup_encryption_key_crn" {
186186
type = string
187187
description = "The CRN of a Key Protect or Hyper Protect Crypto Services encryption key that you want to use for encrypting the disk that holds deployment backups. Applies only if `use_ibm_owned_encryption_key` is false and `use_same_kms_key_for_backups` is false. If no value is passed, and `use_same_kms_key_for_backups` is true, the value of `kms_key_crn` is used. Alternatively set `use_default_backup_encryption_key` to true to use the IBM Cloud Databases default encryption. Bare in mind that backups encryption is only available in certain regions. See [Bring your own key for backups](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok) and [Using the HPCS Key for Backup encryption](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups)."
188188
default = null
189-
validation {
190-
condition = anytrue([
191-
var.backup_encryption_key_crn == null,
192-
can(regex(".*kms.*", var.kms_key_crn)),
193-
can(regex(".*hs-crypto.*", var.kms_key_crn)),
194-
])
195-
error_message = "Value must be the KMS key CRN from a Key Protect or Hyper Protect Crypto Services instance in one of the supported backup regions."
196-
}
197189
}
198190

199191
variable "use_default_backup_encryption_key" {

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ variable "backup_encryption_key_crn" {
289289
validation {
290290
condition = anytrue([
291291
var.backup_encryption_key_crn == null,
292-
can(regex(".*kms.*", var.kms_key_crn)),
293-
can(regex(".*hs-crypto.*", var.kms_key_crn)),
292+
can(regex(".*kms.*", var.backup_encryption_key_crn)),
293+
can(regex(".*hs-crypto.*", var.backup_encryption_key_crn)),
294294
])
295295
error_message = "Value must be the KMS key CRN from a Key Protect or Hyper Protect Crypto Services instance in one of the supported backup regions."
296296
}

0 commit comments

Comments
 (0)