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_inputs=var.hsm_connector_id!=null&& var.auto_initialization_using_recovery_crypto_units==true?tobool("Provided inputs are not correct. If hsm_conector_id is set to a value then auto_initialization_using_recovery_crypto_units can not be true.") :true
8
-
# tflint-ignore: terraform_unused_declarations
9
-
validate_region=var.auto_initialization_using_recovery_crypto_units==true? (contains(["us-south", "us-east"], var.region) ?true:tobool("Currently us-south and us-east are the only supported regions for HPCS instance initialization using recovery crypto units.")) :true
10
-
# tflint-ignore: terraform_unused_declarations
11
-
validate_num_of_administrators=var.auto_initialization_using_recovery_crypto_units==true? ((length(var.admins) >=1&&length(var.admins) <=8) || (length(var.base64_encoded_admins) >=1&&length(var.base64_encoded_admins) <=8) ?true:tobool("At least one administrator is required for the instance crypto unit and you can set upto 8 adminsitrators.")) :true
12
-
# tflint-ignore: terraform_unused_declarations
13
-
validate_admins_and_threshold=var.auto_initialization_using_recovery_crypto_units==true? (((length(var.admins) >= var.signature_threshold) || (length(var.base64_encoded_admins) >= var.signature_threshold) && (length(var.admins) >= var.revocation_threshold) || (length(var.base64_encoded_admins) >= var.revocation_threshold)) ?true:tobool("The adminstrators of the instance crypto units need to be equal to or greater than the threshold value.")) :true
14
-
# tflint-ignore: terraform_unused_declarations
15
-
validate_num_of_failover_units=var.auto_initialization_using_recovery_crypto_units==true? (var.number_of_failover_units<= var.number_of_crypto_units?true:tobool("Number of failover_units must be less than or equal to the number of operational crypto units")) :true
16
-
# tflint-ignore: terraform_unused_declarations
17
-
validate_admins_variables=var.auto_initialization_using_recovery_crypto_units==true? ((length(var.admins) ==0&&length(var.base64_encoded_admins) ==0) || (length(var.admins) !=0&&length(var.base64_encoded_admins) !=0) ?tobool("Please provide exactly one of admins or base64_encoded_admins. Passing neither or both is invalid.") :true) :true
18
-
19
6
admins_name_map=merge([foradmininvar.base64_encoded_admins: { (admin.name) = { "name" = admin.name } }]...) # map created for non-sensitive value (admin name) only
error_message="Currently us-south and us-east are the only supported regions for HPCS instance initialization using recovery crypto units."
17
+
}
13
18
}
14
19
15
20
variable"name" {
@@ -89,6 +94,22 @@ variable "admins" {
89
94
default=[]
90
95
sensitive=true
91
96
description="A list of administrators for the instance crypto units. See [instructions](https://github.com/terraform-ibm-modules/terraform-ibm-hpcs#before-you-begin) to create administrator signature keys. You can set up to 8 administrators. Required if auto_initialization_using_recovery_crypto_units set to true. "
error_message="Provided inputs are not correct. If hsm_connector_id is set to a value then auto_initialization_using_recovery_crypto_units cannot be true."
0 commit comments