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
Copy file name to clipboardExpand all lines: solutions/standard/main.tf
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,17 @@ module "resource_group" {
18
18
19
19
locals {
20
20
# tflint-ignore: terraform_unused_declarations
21
-
validate_kms_1=var.existing_db_instance_crn!=null?true: var.use_ibm_owned_encryption_key&& (var.existing_kms_instance_crn!=null|| var.existing_kms_key_crn!=null|| var.existing_backup_kms_key_crn!=null) ?tobool("When 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.") :true
21
+
validate_kms_1=var.existing_rabbitmq_instance_crn!=null?true: var.use_ibm_owned_encryption_key&& (var.existing_kms_instance_crn!=null|| var.existing_kms_key_crn!=null|| var.existing_backup_kms_key_crn!=null) ?tobool("When 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.") :true
22
22
# tflint-ignore: terraform_unused_declarations
23
-
validate_kms_2=var.existing_db_instance_crn!=null?true:!var.use_ibm_owned_encryption_key&& (var.existing_kms_instance_crn==null&& var.existing_kms_key_crn==null) ?tobool("When 'use_ibm_owned_encryption_key' is false, a value is required for either 'existing_kms_instance_crn' (to create a new key), or 'existing_kms_key_crn' to use an existing key.") :true
23
+
validate_kms_2=var.existing_rabbitmq_instance_crn!=null?true:!var.use_ibm_owned_encryption_key&& (var.existing_kms_instance_crn==null&& var.existing_kms_key_crn==null) ?tobool("When 'use_ibm_owned_encryption_key' is false, a value is required for either 'existing_kms_instance_crn' (to create a new key), or 'existing_kms_key_crn' to use an existing key.") :true
create_new_kms_key=var.existing_db_instance_crn==null&&!var.use_ibm_owned_encryption_key&& var.existing_kms_key_crn==null?true:false# no need to create any KMS resources if passing an existing key, or using IBM owned keys
31
+
create_new_kms_key=var.existing_rabbitmq_instance_crn==null&&!var.use_ibm_owned_encryption_key&& var.existing_kms_key_crn==null?true:false# no need to create any KMS resources if passing an existing key, or using IBM owned keys
# If KMS encryption enabled (and existing ES instance is not being passed), parse details from the existing key if being passed, otherwise get it from the key that the DA creates
# Validate the region input matches region detected in existing instance CRN (approach based on https://github.com/hashicorp/terraform/issues/25609#issuecomment-1057614400)
261
261
# tflint-ignore: terraform_unused_declarations
262
-
validate_existing_instance_region=var.existing_db_instance_crn!=null&& var.region!= local.existing_rabbitmq_region?tobool("The region detected in the 'existing_db_instance_crn' value must match the value of the 'region' input variable when passing an existing instance.") :true
262
+
validate_existing_instance_region=var.existing_rabbitmq_instance_crn!=null&& var.region!= local.existing_rabbitmq_region?tobool("The region detected in the 'existing_rabbitmq_instance_crn' value must match the value of the 'region' input variable when passing an existing instance.") :true
263
263
}
264
264
265
265
# Do a data lookup on the resource GUID to get more info that is needed for the 'ibm_database' data lookup below
0 commit comments