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
validate_kms_plan=var.kms_encryption_enabled&& var.plan!="standard"?tobool("kms encryption is only supported for standard plan") :true
7
5
# tflint-ignore: terraform_unused_declarations
8
6
validate_kms_values=!var.kms_encryption_enabled&& (var.existing_kms_instance_crn!=null|| var.root_key_id!=null|| var.kms_endpoint_url!=null) ?tobool("When passing values for var.existing_kms_instance_crn or/and var.root_key_id or/and var.kms_endpoint_url, you must set var.kms_encryption_enabled to true. Otherwise unset them to use default encryption") :true
9
7
# tflint-ignore: terraform_unused_declarations
@@ -12,7 +10,6 @@ locals {
12
10
validate_cos_values=!var.cos_integration_enabled&& (var.cos_instance_id!=null|| var.cos_bucket_name!=null|| var.cos_endpoint!=null) ?tobool("When passing values for var.cos_instance_id or/and var.cos_bucket_name or/and var.cos_endpoint, you must set var.cos_integration_enabled to true. Otherwise unset them to disable collection of failed delivery events") :true
13
11
# tflint-ignore: terraform_unused_declarations
14
12
validate_cos_vars=var.cos_integration_enabled&& (var.cos_instance_id==null|| var.cos_bucket_name==null|| var.cos_endpoint==null) ?tobool("When setting var.cos_integration_enabled to true, a value must be passed for var.cos_instance_id, var.cos_bucket_name and var.cos_endpoint") :true
15
-
16
13
# Determine what KMS service is being used for encryption
Copy file name to clipboardExpand all lines: solutions/standard/main.tf
+1-15Lines changed: 1 addition & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,7 @@ module "resource_group" {
17
17
18
18
# Input variable validation
19
19
locals {
20
-
# Validate that a value has been passed for 'existing_kms_instance_crn' and 'kms_endpoint_url' if not using existing EN instance
21
-
# tflint-ignore: terraform_unused_declarations
22
-
validate_kms_input=(var.existing_kms_instance_crn==null|| var.kms_endpoint_url==null) && var.existing_en_instance_crn==null?tobool("A value for 'existing_kms_instance_crn' and 'kms_endpoint_url' must be passed when no value is passed for 'existing_en_instance_crn'.") :true
validate_cos_regions=var.cos_bucket_region!=null&& var.cross_region_location!=null?tobool("Cannot provide values for 'cos_bucket_region' and 'cross_region_location'. Pick one or the other, or alternatively pass no values for either and allow it to default to the 'region' input.") :true
228
-
229
-
# Validate cos inputs when using existing bucket
230
-
# tflint-ignore: terraform_unused_declarations
231
-
validate_cos_bucket=var.existing_cos_bucket_name!=null&& (var.existing_cos_instance_crn==null|| var.existing_cos_endpoint==null) ?tobool("When passing a value for 'existing_cos_bucket_name', you must also pass values for 'existing_cos_instance_crn' and 'existing_cos_endpoint'.") :true
232
-
233
222
# If a bucket name is passed, or an existing EN CRN is passed; do not create COS resources
# Validate that a value has been passed for 'existing_secrets_manager_instance_crn' if creating credentials using the 'service_credential_secrets' input
344
-
# tflint-ignore: terraform_unused_declarations
345
-
validate_sm_crn=length(var.service_credential_secrets) >0&& var.existing_secrets_manager_instance_crn==null?tobool("'existing_secrets_manager_instance_crn' is required when adding service credentials with the 'service_credential_secrets' input.") :false
description="The CRN of the KMS instance (Hyper Protect Crypto Services or Key Protect instance). If the KMS instance is in different account you must also provide a value for `ibmcloud_kms_api_key`."
error_message=("A value for 'existing_kms_instance_crn' and 'kms_endpoint_url' must be passed when no value is passed for 'existing_en_instance_crn'.")
error_message="When passing a value for 'existing_cos_bucket_name', you must also pass values for 'existing_cos_instance_crn' and 'existing_cos_endpoint'."
description="The COS bucket region. If you pass a value for this variable, you must set the value of `cross_region_location` to null. If `cross_region_location` and `cos_bucket_region` are both set to null, then `region` will be used."
error_message="Cannot provide values for both 'cos_bucket_region' and 'cross_region_location'. Pick one or the other, or alternatively, pass no value for either and allow it to default to the 'region' input."
description="Set to `true` to control the encryption keys that are used to encrypt the data that you store in the Event Notifications instance. If set to `false`, the data is encrypted by using randomly generated keys. For more information, see [Managing encryption](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-managing-encryption)."
0 commit comments