Skip to content

Commit 7997a69

Browse files
committed
fix validation around KMS key when using existing SM instance
1 parent fbc280b commit 7997a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ locals {
1818
# tflint-ignore: terraform_unused_declarations
1919
validate_region = var.existing_sm_instance_crn == null && var.region == null ? tobool("When existing_sm_instance_crn is null, a value must be passed for var.region") : true
2020
# tflint-ignore: terraform_unused_declarations
21-
validate_is_hpcs_key = var.is_hpcs_key && local.kms_service_name != "hs-crypto" ? tobool("When is_hpcs_key is set to true then the key provided through kms_key_crn must be a Hyper Protect Crypto Services key") : true
21+
validate_is_hpcs_key = var.existing_sm_instance_crn == null && var.is_hpcs_key && local.kms_service_name != "hs-crypto" ? tobool("When is_hpcs_key is set to true then the key provided through kms_key_crn must be a Hyper Protect Crypto Services key") : true
2222
}
2323

2424
locals {

0 commit comments

Comments
 (0)