diff --git a/modules/fscloud/variables.tf b/modules/fscloud/variables.tf index d54d554e..09b9b69b 100644 --- a/modules/fscloud/variables.tf +++ b/modules/fscloud/variables.tf @@ -167,15 +167,6 @@ variable "backup_encryption_key_crn" { type = string 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)." default = null - - validation { - condition = anytrue([ - var.backup_encryption_key_crn == null, - can(regex(".*kms.*", var.kms_key_crn)), - can(regex(".*hs-crypto.*", var.kms_key_crn)), - ]) - 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." - } } variable "use_default_backup_encryption_key" { diff --git a/variables.tf b/variables.tf index 92baf748..871468aa 100644 --- a/variables.tf +++ b/variables.tf @@ -211,8 +211,8 @@ variable "backup_encryption_key_crn" { validation { condition = anytrue([ var.backup_encryption_key_crn == null, - can(regex(".*kms.*", var.kms_key_crn)), - can(regex(".*hs-crypto.*", var.kms_key_crn)), + can(regex(".*kms.*", var.backup_encryption_key_crn)), + can(regex(".*hs-crypto.*", var.backup_encryption_key_crn)), ]) 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." }