diff --git a/terraform/gcp/single-into-existing-vpc/locals.tf b/terraform/gcp/single-into-existing-vpc/locals.tf index 02c8cc0c..c5e91fd4 100755 --- a/terraform/gcp/single-into-existing-vpc/locals.tf +++ b/terraform/gcp/single-into-existing-vpc/locals.tf @@ -13,6 +13,10 @@ locals { // Will fail if the installation type is none of the above validate_installation_type = index(local.installation_type_allowed_values, var.installationType) + regex_valid_sicKey = "^([a-z0-9A-Z]{8,30})$" + // Will fail if var.sicKey is invalid + regex_sicKey = regex(local.regex_valid_sicKey, var.sicKey) == var.sicKey ? 0 : "Variable [sicKey] must be at least 8 alpha numeric characters." + regex_validate_mgmt_image_name = "check-point-r8[0-1][1-4]0-(byol|payg)-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" regex_validate_single_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-single-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" // will fail if the image name is not in the right syntax