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
{{ message }}
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: solutions/instances/main.tf
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ locals {
8
8
# tflint-ignore: terraform_unused_declarations
9
9
validate_cos_inputs=var.existing_scc_cos_bucket_name!=null&& var.existing_scc_cos_kms_key_crn!=null?tobool("A value should not be passed for 'existing_scc_cos_kms_key_crn' when passing a value for 'existing_scc_cos_bucket_name'. A key is only needed when creating a new COS bucket.") :true
10
10
# tflint-ignore: terraform_unused_declarations
11
+
validate_more_cos_inputs=var.existing_scc_cos_bucket_name!=null&& var.existing_cos_instance_crn==null?tobool("A value for 'existing_cos_instance_crn' must be passed if 'existing_scc_cos_bucket_name' is passed in.") :true
12
+
# tflint-ignore: terraform_unused_declarations
11
13
validate_auth_inputs=!var.skip_scc_cos_auth_policy&& var.existing_cos_instance_crn==null&& var.existing_scc_cos_bucket_name!=null?tobool("A value must be passed for 'existing_cos_instance_crn' in order to create auth policy.") :true
12
14
# tflint-ignore: terraform_unused_declarations
13
15
validate_en_integration=var.existing_en_crn!=null&& var.en_source_name==null?tobool("When passing a value for 'existing_en_crn', a value must also be passed for 'en_source_name'.") :false
# Create IAM Authorization Policy to allow COS to access KMS for the encryption key, if cross account KMS is passed in
@@ -116,7 +122,7 @@ module "kms" {
116
122
providers={
117
123
ibm = ibm.kms
118
124
}
119
-
count=var.existing_scc_cos_kms_key_crn!=null|| var.existing_scc_cos_bucket_name!=null|| var.existing_scc_instance_crn!=null?0:1# no need to create any KMS resources if passing an existing key or bucket, or SCC instance
125
+
count=local.use_kms_module?1:0# no need to create any KMS resources if passing an existing key or bucket, or SCC instance
0 commit comments