Skip to content

Commit

Permalink
GCP TF | Single GW | Added SIC validation
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-yairra committed Sep 28, 2023
1 parent 825788f commit 5b6301b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terraform/gcp/single-into-existing-vpc/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b6301b

Please sign in to comment.