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: main.tf
-12Lines changed: 0 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,6 @@
6
6
locals {
7
7
# Validation (approach based on https://github.com/hashicorp/terraform/issues/25609#issuecomment-1057614400)
8
8
# tflint-ignore: terraform_unused_declarations
9
-
validate_kms_values=(!var.kms_encryption_enabled&& var.kms_key_crn!=null&& var.existing_sm_instance_crn==null) ?tobool("When passing values for var.kms_key_crn, you must set 'kms_encryption_enabled' to true. Otherwise set 'kms_encryption_enabled' to false to use default encryption") :true
10
-
# tflint-ignore: terraform_unused_declarations
11
-
validate_kms_vars=var.kms_encryption_enabled&& var.kms_key_crn==null&& var.existing_sm_instance_crn==null?tobool("When setting var.kms_encryption_enabled to true, a value must be passed for var.kms_key_crn") :true
12
-
# tflint-ignore: terraform_unused_declarations
13
-
validate_auth_policy=var.kms_encryption_enabled&& var.skip_kms_iam_authorization_policy==false&& var.kms_key_crn==null&& var.existing_sm_instance_crn==null?tobool("When var.skip_kms_iam_authorization_policy is set to false, and var.kms_encryption_enabled to true, a value must be passed for var.kms_key_crn in order to create the auth policy.") :true
14
-
# tflint-ignore: terraform_unused_declarations
15
-
validate_event_notification=var.enable_event_notification&& var.existing_en_instance_crn==null?tobool("When setting var.enable_event_notification to true, a value must be passed for var.existing_en_instance_crn") :true
16
-
# tflint-ignore: terraform_unused_declarations
17
-
validate_endpoint=var.endpoint_type=="public"&& var.allowed_network=="private-only"&& var.existing_sm_instance_crn==null?tobool("It is not allowed to have conflicting var.endpoint_type and var.allowed_network values.") :true
18
-
# tflint-ignore: terraform_unused_declarations
19
-
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
20
-
# tflint-ignore: terraform_unused_declarations
21
9
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
Copy file name to clipboardExpand all lines: variables.tf
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,16 @@ variable "kms_key_crn" {
65
65
type=string
66
66
description="The root key CRN of a Key Management Service like Key Protect or Hyper Protect Crypto Services (HPCS) that you want to use for encryption. Only used if `kms_encryption_enabled` is set to true."
error_message="When passing values for var.kms_key_crn, you must set 'kms_encryption_enabled' to true. Otherwise set 'kms_encryption_enabled' to false to use default encryption."
description="Set this to true to enable lifecycle notifications for your Secrets Manager instance by connecting an Event Notifications service. When setting this to true, a value must be passed for `existing_en_instance_crn` and `existing_sm_instance_crn` must be null."
0 commit comments