Skip to content

Commit

Permalink
TF| Add support for BYOL license type for Standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-meravbe committed Nov 13, 2023
1 parent 52a2323 commit 3c6cf63
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
4 changes: 3 additions & 1 deletion terraform/aws/modules/amis/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ locals {
// version_license_key = "R80.40-PAYG-NGTX-GW"
// version_license_value = "R8040PAYGNGTXGW"

version_license_key = format("%s%s", var.version_license, var.chkp_type == "gateway" ? "-GW" : var.chkp_type == "management" ? "-MGMT" : var.chkp_type == "mds" ? "-MGMT" : "")
version_license_key_mgmt_gw = format("%s%s", var.version_license, var.chkp_type == "gateway" ? "-GW" : var.chkp_type == "management" ? "-MGMT" : var.chkp_type == "mds" ? "-MGMT" : "")
version_license_key = var.chkp_type == "standalone" ? format("%s%s", var.version_license, element(split("-", var.version_license), 1) == "BYOL" ? "-MGMT" : "") : local.version_license_key_mgmt_gw

version_license_value = local.amis_yaml_converterMap[local.version_license_key]["Value"]

// Variables example:
Expand Down
4 changes: 4 additions & 0 deletions terraform/aws/modules/common/version_license/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ locals {
"R81.20-BYOL"
]
standalone_versions = [
"R80.40-BYOL",
"R80.40-PAYG-NGTP",
"R81-BYOL",
"R81-PAYG-NGTP",
"R81.10-BYOL",
"R81.10-PAYG-NGTP",
"R81.20-BYOL",
"R81.20-PAYG-NGTP"
]
gwlb_gw_versions = [
Expand Down
5 changes: 3 additions & 2 deletions terraform/aws/standalone-master/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion terraform/aws/standalone-master/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ instance_tags = {
}

// --- Check Point Settings ---
standalone_version = "R81.20-PAYG-NGTP"
standalone_version = "R81.20-BYOL"
admin_shell = "/etc/cli.sh"
standalone_password_hash = ""

Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/standalone-master/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ variable "instance_tags" {
variable "standalone_version" {
type = string
description = "Gateway & Management (Standalone) version and license"
default = "R81.20-PAYG-NGTP"
default = "R81.20-BYOL"
}
module "validate_standalone_version" {
source = "../modules/common/version_license"
Expand Down
27 changes: 14 additions & 13 deletions terraform/aws/standalone/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion terraform/aws/standalone/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ instance_tags = {
}

// --- Check Point Settings ---
standalone_version = "R81.20-PAYG-NGTP"
standalone_version = "R81.20-BYOL"
admin_shell = "/etc/cli.sh"
standalone_password_hash = ""

Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/standalone/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ variable "instance_tags" {
variable "standalone_version" {
type = string
description = "Security Gateway & Management (Standalone) version and license"
default = "R81.20-PAYG-NGTP"
default = "R81.20-BYOL"
}
module "validate_standalone_version" {
source = "../modules/common/version_license"
Expand Down

0 comments on commit 3c6cf63

Please sign in to comment.