Skip to content

Commit 351adba

Browse files
Fix: add condition to not create kms resources if an existing db instance is provided (#267)
Co-authored-by: shemau <[email protected]>
1 parent b844489 commit 351adba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solutions/standard/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module "kms" {
6565
providers = {
6666
ibm = ibm.kms
6767
}
68-
count = var.existing_kms_key_crn != null ? 0 : 1 # no need to create any KMS resources if passing an existing key
68+
count = var.existing_kms_key_crn != null || local.use_existing_db_instance ? 0 : 1 # no need to create any KMS resources if passing an existing key
6969
source = "terraform-ibm-modules/kms-all-inclusive/ibm"
7070
version = "4.15.8"
7171
create_key_protect_instance = false

0 commit comments

Comments
 (0)